Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to use Lambda so the if statement is it's own test condition without rewriting if statement in google sheets

This is a general question based not on specific formula – but I couldn’t find an answer to it anywhere – but it seems like it should be possible.
In this screenshot, you, Y and X are the same for the sake of example (there is a slight difference, but for example’s sake – let’s assume it’s the same).
enter image description here

In the formula, the same formula is used in an if statement to determine if we should move forward with actually calculating the formula. Is there a way to use lambda not to repeat the formula?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

yes you may condense it to something in the sorts of:

=lambda(X,if(X>0,X,0))(*FORMULA*)

a generalized example in the screenshot:

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading