OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

in CALC, logical operator "AND" read blank as TRUE

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
emaloney
Newbie
Newbie


Joined: 24 Apr 2012
Posts: 3

PostPosted: Tue Apr 24, 2012 1:31 pm    Post subject: in CALC, logical operator "AND" read blank as TRUE Reply with quote

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?
Sad
Back to top
View user's profile Send private message
keme
Moderator
Moderator


Joined: 30 Aug 2004
Posts: 2910
Location: Egersund, Norway

PostPosted: Wed Apr 25, 2012 5:16 am    Post subject: Reply with quote

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
View user's profile Send private message
emaloney
Newbie
Newbie


Joined: 24 Apr 2012
Posts: 3

PostPosted: Wed Apr 25, 2012 8:34 am    Post subject: AND(blank,number) returns "1" Reply with quote

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
Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> General Discussion All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group