Forum Discussion
JeffGreenberg
Sep 30, 2022Copper Contributor
Avoiding repetition of a long formula
I have a long formula that I want to put in an if statement. If the test is true, I want to return the value of the long formula. Is there any way to avoid entering the formula twice, once for the te...
- Sep 30, 2022
Are you familiar with the new LET function? If I'm understanding what you want do, that might well do it for you. One of its main purposes is to eliminate redundancy in a formula.
=LET(lofo,longformula(),IF(lofo>0),lofo(),"Invalid negative value") or something like that, would enable you to write the whole long formula only once.
mathetes
Sep 30, 2022Silver Contributor
Are you familiar with the new LET function? If I'm understanding what you want do, that might well do it for you. One of its main purposes is to eliminate redundancy in a formula.
=LET(lofo,longformula(),IF(lofo>0),lofo(),"Invalid negative value") or something like that, would enable you to write the whole long formula only once.
- JeffGreenbergSep 30, 2022Copper ContributorExactly what I was looking for. Thanks!!!!