Why can't you use setValue in a custom function? [closed]

只愿长相守 提交于 2019-12-02 13:12:17

I think it is quite logical. When you're calling a custom function in a cell, say A1, you are expecting the function to do the calculation (or whatever) and place the result in A1. If you want to see the result in B1, you'd write the same formula in B1.

As the doc explains, there might be cases where you want the function to return more than one value in which case, returning a 2D array will populate the cells adjacent to the one where the formula was called.

In any case, can you give the use case you have where you want to populate a different cell using a custom function. You can always call a script in other fashions (not as a formula) and have it modify any cell you want.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!