2
votes
Accepted
Determine if onEdit() was triggered by inserting or removing a row
row and column information isn't available via onChange()
You can determine the active row and column in an installable "on change" trigger like this:
const ss = SpreadsheetApp.getActive()...
1
vote
Accepted
How to do autoresizecolumns() in a Google Sheets file when data imported from another Google Sheets file is changed
Use Installable Trigger
Instead of using the simple trigger onOpen(e) bound to Staff Contacts, use an installable trigger in Staff Roster to make the change in Staff Contacts whenever Staff Roster is ...
1
vote
Basic date manipulation in Google script
This is an old post, but still valuable.
You can set the values back to date objects prior to comparing them:
var curDate = Utilities.formatDate(FullDT, "GMT-0400", "MM/dd/yyyy")
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
google-apps-script × 1788google-sheets × 1513
google-apps-script-triggers × 133
google-forms × 122
formulas × 93
google-docs × 90
google-sheets-timestamp × 77
google-drive × 71
google-sheets-custom-function × 70
google-workspace × 62
gmail × 53
javascript × 48
google-sheets-query × 30
google-sheets-arrayformula × 25
conditional-formatting × 20
sorting × 19
google-calendar × 18
importrange × 17
google-sheets-dates × 15
google-sheets-macro × 14
google-apps-script-add-on × 13
automation × 12
data-validation × 12
google-contacts × 11
permissions × 10