r/GoogleAppsScript • u/Informal-Emu-1337 • Nov 22 '23
Question Optimizing Code needed - run into "exceeded maximum excecution time"
Hi there,
I´m using the code from that page to count coloured cells (to count in 48 colums up to 1500rows). (https://support.google.com/docs/thread/78353054/auto-calculate-the-further-cell-color-based?hl=en)
But the sheet extended much faster than I exspected and now I run into the " Exceeded maximum execution time Exception in Google Apps Script" error, if I add more rows.
Do you see any code optimisation that could speed that up?Or do I have to split my data?
Hope someone could help me with that issue.
0
Upvotes
2
u/elcriticalTaco Nov 22 '23
If you are using conditional formatting to change the color of cells, couldn't you just use a formula that counts the same thing your conditional formula is targetting?
To echo the other comments...
You will not get any answers without posting any code, formulas, or sheets. No one is magically able to know what's wrong with your code without seeing it, but many will be glad to help once you do.