Google Sheets - Move a ROW up
I have a spreadsheet with multiple sheets and I am moving rows from sheet
to sheet when a cell has a certain value. Note we are using drop down data
validation in the cell.
I need help moving a row to the top, just below our locked header row of
the same sheet it is in.
This is what I am trying to do.
if (activatedSheetName == testQueue.getName() && activatedCellColumn == 2
&& activatedCellValue == "1st-Urgent" ) {
testQueue.insertRows(3,1);
var rangeToMove =
testQueue.getRange(activatedCellRow,1,1,testQueue.getMaxColumns());
rangeToMove.moveTo(testQueue.getRange("A3"));
testQueue.getRange("A3").setValue(getTimeStamp());
testQueue.deleteRow(activatedCellRow);
}
I know the above code is not right and would appreciate any help.
Thank you!
No comments:
Post a Comment