You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an Every tweet goes out, it removes the first tweet at B3 and moves the list up, but does not rotate the first tweet to the bottom.
function everyRotate(){
var everySheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Every");
var lastRow = everySheet.getLastRow();
var nextLastRow = lastRow + 1;
// copy the value of row 3 to the end of the column
var nextValues = everySheet.getRange("b3:z3").getValues();
everySheet.getRange("b"+lastRow+":z"+lastRow).setValues(nextValues);
everySheet.deleteRow(3);
}
Perhaps you meant to do something with nextLastRow?
The text was updated successfully, but these errors were encountered:
Perhaps this is more like what you intended. This rotates (rather than slowly nukes) the list.
var everySheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Every");
var lastRow = everySheet.getLastRow();
var nextLastRow = lastRow + 1;
// copy the value of row 3 to the end of the column
var justTweetedValues = everySheet.getRange("b3:z3").getValues();
everySheet.getRange("b"+nextLastRow+":z"+nextLastRow).setValues(justTweetedValues);
// now remove row 3 which will move everything up one
everySheet.deleteRow(3);
}
When an Every tweet goes out, it removes the first tweet at B3 and moves the list up, but does not rotate the first tweet to the bottom.
Perhaps you meant to do something with nextLastRow?
The text was updated successfully, but these errors were encountered: