I have about a hundred nested functions that defines the value of a cell.
I want to add another one that make that nested one return 0 under certain conditions, and itself under other.
Which means that in a single cell, my if statement becomes:
=If([one_hundred_nested_functions]<0,[one_hundred_nested_functions,0)
As you can see, this statement makes me write the nested functions 2 times in the single statement: one for evaluating and one for value_if_true.
Does spreadsheets or excel have any shorthand or other (non-custom) function for that?
CodePudding user response:
There isn't a specific shorthand. But in numeric outputs,TEXT
function maybe used. So,
=If([one_hundred_nested_functions]<0,[one_hundred_nested_functions],0)
can be simplified to:
=TEXT([one_hundred_nested_functions],"\0;-#.0")*1
You can also use MIN
in this case:
=MIN([one_hundred_nested_functions],0)