Forum Discussion
NathanB2
Feb 05, 2023Copper Contributor
Excel if functions with condition 1, condition 2, condition 3, and condition blank
Hi there. This is my first time to post here.
I have limited Excel knowledge. I know how to use an IF formula to do something like "if cell D2 = X, then do this; otherwise do something else."
But what I want to do is this:
- if cell d2 ="X", then "blah, blah", or if d2 = "Y", then "blah, blah blah", or if d2 = anything else, then "blah", but if cell d2 is blank, then do nothing
Please help; thank you very much.
- You have typed space in this formula IF(D2=" "," ","none of the above"), remove that space, try- =IF(D2="","","none of the above")
- NathanB2Copper Contributor
Thank you very much for your help. Except for the blank bit, it worked for me. This is what I typed into Excel:
=IF(D2="a","a hi",IF(D2="b","b hi",IF(D2=" "," ","none of the above")))
Unfortunately, if d2 is blank, then it still says "none of the above." What I want in that case is for it to return nothing at all.
Do you have any suggestions for how to fix that?
- Harun24HRBronze ContributorYou have typed space in this formula IF(D2=" "," ","none of the above"), remove that space, try- =IF(D2="","","none of the above")