Solved Nested IF AND syntax if a condition cell has a value

July 22, 2012 at 15:23:05
Specs: Windows XP
Hi, I've read the excellent post on nested IF AND syntax, but I have one thing I can't solve. Scenario: If cell A1 contains either "Value1" or "Value2" and cell C1 is empty, then value of cell D1 = "1". Thus:
=IF(AND(A1= "Value1",C1=""),1, (IF(AND(A1= "Value2",C1=""),1))). This in itself works fine, but, what I want is for cell D1 to be blank if a value is put in cell C1. It currently puts "FALSE" in cell D1. Any help much appreciated.

See More: Nested IF AND syntax if a condition cell has a value

Report •

#1
July 22, 2012 at 16:01:40
I think I've sorted this. I added empty speech marks after the last result: 1,"")). That produces a blank D1 cell.

Report •

#2
July 22, 2012 at 16:18:28
✔ Best Answer
Just in case you aren't aware of why the double quotes fixed the problem, here's why:

If you don't supply a value_if_false argument for a IF function, Excel will automatically return FALSE when the logical_test is not TRUE.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#3
July 22, 2012 at 16:39:17
Thanks DerbyDad03, much appreciated!

Report •
Related Solutions


Ask Question