Newbie to sheets and scripts!
I have seen this question,and am partially successful to the extent of creating a new row with date being updated using this script
var ss = SpreadsheetApp.openById("1ewiUoG1LCvnrArEy96k6N0n4WHfR-TP77ACGQV11_Hk");
var sh = ss.getSheetByName("Daily Summary");
sh.insertRowAfter(1);
sh.getRange("A2").setFormula('=A3+1');
}
I have nearly two dozen columns that I would like to be updated everyday at midnight. Typically the column values are of the type
=COUNTIFS('2022'!F4:F319,"=GG-B-Recovered")
, so I added this line to the above scriptsh.getRange("B2").setFormula('=COUNTIFS('2022'!F4:F319,"=GG-A-Active")');
(2022
is a separate tab in the same workbook. When I run this script , the new row is NOT created and this error showsAttempted to execute newrow, but could not save.
Another kind of value is like
='Dashboard '!R17
, where dashboard is yet another tab in the same book and I suspect the error is in referring to the sheet or maybe more
How do I fix this please?