0

let's say i use a function in a cell to call data in and the result is an #ERROR!, is it possible to automaticly call this function again for another try ? To be clear, i am not asking for autorefresh with a trigger on settings from a sheet, i talk about a general way to have a workaround.

For example a formula i use for many rows: =if(A2 = FALSE;"";custom_function_1(A2))

This is activating the function when A2 is filled with a value and not empty, but during the loading process sometimes the server answer is not possible or broken or what ever, then i get ofc #ERROR!.

Would be nice to have an Option to force the command again if this happens.

Errious
  • 53
  • 1
  • 10
  • Possible duplicate of [Refresh data retrieved by a custom function in Google Sheet](https://stackoverflow.com/questions/17341399/refresh-data-retrieved-by-a-custom-function-in-google-sheet) – TheMaster Jun 11 '18 at 22:49
  • What are you loading: the data from the server or the spreadsheet? –  Jun 11 '18 at 23:40
  • I will get data from a server or web with api to a cell stuff like prices or other things and my script is doing it good so far, i used sleep functions between requests to slow down the process and even then i get sometimes errors, this is why i look for such a way to have some kind of errorhandling... – Errious Jun 12 '18 at 08:03

1 Answers1

0

Why don't you just handle the error in your custom function? Only return what you get from the API if you can reach it, otherwise return whatever "Error" value you want, such as the previous call you were able to successfully make.

e__n
  • 697
  • 7
  • 11
  • Simple answer, i did not build the script and i am not familiar with this stuff at all, i can use and change little things on the script but to whrite a function so it is doing what you say is far beyond my abillities. – Errious Jun 12 '18 at 11:10
  • Maybe you can post the code and someone here can help with the error handling, but yea don't think there's an easy option somewhere that 'recalculates' when there's an error in a cell. Most of the time cell errors are static, e.g. you used the wrong number of arguments or something and recalculating will give you the same results, so it doesn't seem unusual that that's not an option. – e__n Jun 13 '18 at 04:09