| View previous topic :: View next topic |
| Author |
Message |
emaloney Newbie

Joined: 24 Apr 2012 Posts: 3
|
Posted: Tue Apr 24, 2012 1:31 pm Post subject: in CALC, logical operator "AND" read blank as TRUE |
|
|
In Calc,
when I reference a blank cell
as one of the variables
in a logical "AND" function
it wrongly reads the blank as TRUE,
thus giving a TRUE result to the "AND" function.
Shouldn't a blank be read as FALSE?
In calculations, blank cells are read as zero;
why not also read blank as zero by logic functions?
 |
|
| Back to top |
|
 |
keme Moderator


Joined: 30 Aug 2004 Posts: 2730 Location: Egersund, Norway
|
Posted: Wed Apr 25, 2012 5:16 am Post subject: |
|
|
And disregards nonexistent values.
AND(A1;A2) will return #VALUE if A1 and A2 are both empty. If one is nonzero and the other is empty it returns TRUE.
To force calc to return a value from an empty cell, use a calculation. The N() function is perhaps the most logical.
=AND(N(A1);N(A2)) |
|
| Back to top |
|
 |
emaloney Newbie

Joined: 24 Apr 2012 Posts: 3
|
Posted: Wed Apr 25, 2012 8:34 am Post subject: AND(blank,number) returns "1" |
|
|
Hi
Thanks so much for your reply.
FYI:
AND(blank,integer) returns "1"
("AND" function referencing a blank cell and a cell containing an integer)
is the situation where I found unexpected result for "AND" function.
I really appreciate your feedback!
Erin
 |
|
| Back to top |
|
 |
|