'Move specific range script

Im looking for a script that can move this specific range "c4:g4" to a another tab called "Stats". I also want it to post on the next available row starting from Col A.

It doesent have to be onedit since im going to do a time trigger.

Is this possible to solve?

Looking forward to some answerds.

Cheers

Eric



Solution 1:[1]

Copying a section to another sheet

function elfunko() {
  const ss = SpreadsheetApp.getActive();
  const sh = ss.getActiveSheet();
  const osh = ss.getSheetByName("Stats");
  const vs = sh.getRange("C4:G4").getValues();
  osh.getRange(osh.getLastRow() + 1,1,vs.length,vs[0].length).setValues(vs);
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Cooper