IF comparison

  • Thread starter Thread starter diego
  • Start date Start date
D

diego

I have an empty cell, A1. Then, I put this formula in :

B1 : IF(A1="",1,0)
C1 : IF(A1=0,1,0)

Both cells give me 1. Does it mean Excel treats "" and 0
as the same ?


Thanks
 
Yep.

Excel does its best to help you. (Sometimes you don't want the help and have to
adjust your formula, though.)
 
When used in a text comparison (your first formula), a blank is treated as a 0-length string.
When used in a numeric comparison (your 2nd formula), it's treated as 0. But, in general, 0 and
"" are not the same: The formula =(""=0) returns False.
 
Back
Top