Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
I'm really just curious, but does anyone know why you can't use setValue to write in different cell in a custom function?
The readme explains that you can't do this, but doesn't give a reason on why: link
Custom functions return values, but they cannot set values outside the cells they are in. In most circumstances, a custom function in cell A1 cannot modify cell A5. However, if a custom function returns a double array, the results overflow the cell containing the function and fill the cells below and to the right of the cell containing the custom function. You can test this with a custom function containing return [[1,2],[3,4]];.
Anyone knows if there is a good reason for this?