google sheets automatic update rook

Solutions on MaxInterview for google sheets automatic update rook by the best coders in the world

showing results for - "google sheets automatic update rook"
Adeline
01 Oct 2017
1function storeFollowers(){
2    var sheet = SpreadsheetApp.getActiveSheet();
3    var datarange = sheet.getDataRange();
4    var numRows = datarange.getNumRows();
5    var numColumns = datarange.getNumColumns();
6    var nextColumn = numColumns + 1;
7    sheet.getRange(1, nextColumn).setValue(new Date());
8    for (var i=2; i <= numRows; i++){
9      var numLikes = sheet.getRange(i, 3).getValue();
10      sheet.getRange(i, numColumns + 1).setValue(numLikes);
11    }
12}
13