I’ve been having trouble with custom functions in the latest version of Google Sheets. Sometimes when I use them the cells just show a red box with ‘Loading…’ and it never goes away. It’s super annoying!
I tried what Google suggested - reloading the page and renaming the function - but it didn’t help. Has anyone else run into this? Do you know any tricks to fix it?
I’m not doing anything too complicated, just basic stuff like:
function CUSTOM_SUM(a, b) {
return a + b;
}
But even simple functions like this get stuck sometimes. It’s making it hard to use custom functions at all. Any ideas would be really helpful!
I’ve dealt with this annoyance too, and it’s a real pain. One thing that’s worked for me is splitting complex custom functions into smaller, simpler ones. Instead of one big function doing everything, I use multiple smaller functions and combine their results. This seems to reduce the chances of getting stuck on ‘Loading…’.
Another trick I’ve found helpful is adding a small delay in the function using Utilities.sleep(100). This gives Google Sheets a moment to breathe and often prevents the endless loading issue.
Also, double-check that you’re not accidentally creating circular references in your sheets. I once spent hours troubleshooting only to realize I had a sneaky circular reference causing the problem.
If all else fails, I’ve had some success by copying the entire sheet to a new document. It’s a hassle, but sometimes it’s the only way to get things working again.
ugh, i’ve been dealing with this too! so frustrating. have u tried clearing ur browser cache? that sometimes helps for me. also, i noticed it happens less if i keep my sheets smaller and don’t use too many custom functions at once. might be worth a shot if u haven’t tried those yet
I’ve encountered this issue as well, and it can indeed be quite frustrating. One workaround I’ve found effective is to use the IFERROR function wrapped around your custom function. For example:
=IFERROR(CUSTOM_SUM(A1, B1), “Error”)
This approach forces the cell to display “Error” instead of getting stuck on “Loading…”. Additionally, I’ve noticed that disabling and re-enabling the Google Sheets API in the Google Cloud Console sometimes resolves persistent loading issues. It’s a bit technical, but it might be worth exploring if the problem persists.