this is taken from an excel worksheet with no VBA involved. Is there any way to reconstruct
=IF(ISERROR(function_return),something_else,function_return)
such that the term function_return will only be stated once explicitly. Because function_return could have a lot of parameters that I want to adjust at one place only, instead of at both instances.
In other languages I would try to use
var foo = function_return(many_many_arguments)
=IF(ISERROR(foo),something_else,foo)
Can something like this be realized inside of one cell?
Thanks for your help.
Not sure if I’m interpreting correctly (disregard if so 🙂 ), but it sounds like you could simulate this with a named range. For example, if I have the function
=SUM(A1:A5), I could create a named rangeFoothat was equal to=SUM(A1:A5). Then, I could write a formula like:If
Foocalculated properly, it would return the value; otherwise, it would return “Something else”. You could expandFooto cover whatever formula you are trying to calculate. You could then useFooin any formula without having to retype the range.