I have blank B2 cell.
=ISBLANK(B2) gives TRUE
A simple logical test on it returns FALSE
=IF(B2,TRUE,FALSE) gives FALSE
Yet when directly used in an AND statement, it returns TRUE
=AND(B2,TRUE) gives TRUE
Of course, when indirectly used in an AND statment, it still returns FALSE
=AND(IF(B2,TRUE,FALSE),TRUE) gives FALSE
Could you explain me please why my Excel behave in that way?
Answer
Extracted from here, look for the section titled Excel logical functions - facts and figures:
In Excel when you are using logical functions (AND, XOR, NOT, OR), if any of the arguments contains text values or empty cells, such values are ignored.
No comments:
Post a Comment