I\'ve just started playing around with Apps Script. I opened a new spreadsheet, accessed the script editor, and wrote the following simple function:
functio
As per Google's documentation:
A custom function call must return within 30 seconds. If it does not, the cell will display an error: Internal error executing the custom function.
This was indeed my case and I after a wee bit of code optimization I reduced the occurrence of the error to 10% of the cases.