Wednesday 14 November 2018

microsoft excel - AND function gives TRUE result for empty, BLANK cell - why?


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

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...