1

I have a Planning sheet that I use to follow budgets that are reported every week.
I'd like to have K7:18 stamped with a date when there is a change in the corresponding cell of I7:I18 range.
I cannot use onEdit function cause of other scripts currently running. I had no luck with onChange until now, though I'm not skilled with Google Apps Script.

2
  • Welcome to Web Applications Stack Exchange. Nov 2, 2023 at 16:28
  • Per your comment "When I started expanding the datasets within the spreadsheet, it would execute "successfully" but the dates would be updated sporadically. After days of troubleshooting I had to give up on the approach." it would helpful to understand more about the data as well as the other script.
    – Blindspots
    Nov 2, 2023 at 21:41

1 Answer 1

1

When you have two onEdit(e) functions in the same script project, it is indeed the case that only one of them will run.

The simplest pattern to combine two onEdit(e) functions is to rename the existing functions to doFirstThing_(e) and doSecondThing_(e), and then call them like this:

function onEdit(e) {
  doFirstThing_(e);
  doSecondThing_(e);
}

See onEdit(e) best practices.

Alternatively, use a timestamp script that can handle multiple sheets and ranges, such as my yetAnotherTimestamp_ script.

1
  • Thank you for the quick response! I've already tried this approach, and for unknown reason it does not work reliably. When I started expanding the datasets within the spreadsheet, it would execute "successfully" but the dates would be updated sporadically. After days of troubleshooting I had to give up on the approach. I'll take a look at your script. Thanks!
    – user318609
    Nov 2, 2023 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.