Forum Discussion
Axsom
Nov 30, 2019Copper Contributor
I don't know if this can be done
Ok, I hope I can explain what I'm trying to do clear enough to get an answer. The cell A1 can have one of 4 entries, <blank>, 2, 1, 0. I need to nest an IF statement so that if the entry is either l...
SergeiBaklan
Nov 30, 2019Diamond Contributor
Axsom
Nov 30, 2019Copper Contributor
your's came close - I figured it out about 10mins before you replied
=IFS(ISBLANK(A1)=TRUE,"",A1=2,1,A1=1,"",A1=0,0)
- SergeiBaklanNov 30, 2019Diamond Contributor
In addition to Twifoo comments.
You don't need to compare ISBLANK() with logical value, function itself returns it - TRUE or FALSE. You may use another but similar logic within IFS
=IFS( LEN(A1)=0,"", A1=2,1, A1=1,0, A1=0,0, TRUE, "")It's unnecessary long formula, but better illustrates the logic.
- TwifooNov 30, 2019Silver ContributorI beg to disagree! Your formula returns empty text (“”) when A1=1, contrary to your earlier requirement that the formula must return 0 for such an instance. Moreover, your formula also returns 0 when A1 contains empty text (“”), contrary to your earlier requirement that the formula must also return empty text (“”). The formula I suggested earlier, cogitates the foregoing possibilities. Let me share you this rule:
Empty Text (“”) is NOT, but is COUNTED as, BLANK. Ironically, BLANK cells are equivalent (=) to Empty Text (“”).