Forum Discussion
isaacolvey
Feb 01, 2021Copper Contributor
multiple IF in nesting formula
=IF(H20=x,"trash",IF(H20="","",IF(H20=0,"keep", IF(H20>0.01,"sold")))) I am working on my budget, however, I wanted to set 3 "keys" in cell H20, however, this will not allow me to function proper...
JMB17
Feb 01, 2021Bronze Contributor
The only issue I see, based on your description, is that the x should be in quotes:
=IF(H20="x","trash",IF(H20="","",IF(H20=0,"keep", IF(H20>0.01,"sold"))))
And, perhaps, if it is possible the value could be 0.01 then you may need a false argument for the last if statement (or change > to >=)?
isaacolvey
Feb 01, 2021Copper Contributor
I GOT IT!! THANK YOU. one more thing though..
how do I make the blank cell, leave out nothing as in blank, in this nesting function? Because when I leave it empty, it marked as in "sold" when I was asking for it to be blank.
Can you see if I typed out anything wrong about this one?
=IF(D5="X","POSTED",IF(D5>=0.01,"SOLD",IF(D5="","",IF(D5=0,"KEEP"))))
how do I make the blank cell, leave out nothing as in blank, in this nesting function? Because when I leave it empty, it marked as in "sold" when I was asking for it to be blank.
Can you see if I typed out anything wrong about this one?
=IF(D5="X","POSTED",IF(D5>=0.01,"SOLD",IF(D5="","",IF(D5=0,"KEEP"))))
- isaacolveyFeb 01, 2021Copper ContributorEDIT: CORRECTION:
I TYPED Y AS IN TRASH, AND IT MARKED AS SOLD.
=IF(D4="X","POSTED",IF(D4>=0.01,"SOLD",IF(D4="","",IF(D4=0,"KEEP",IF(D4="Y","trash")))))- SergeiBaklanFeb 01, 2021Diamond Contributor
- JMB17Feb 01, 2021Bronze ContributorExcel treats any text value as greater than any number. So, testing for 0.01 needs to be at the end. Also, note that testing for blank "" must come before testing for 0 (as an empty cell will register as both blank and zero, but cell containing a zero 0 will not register as blank).