Logical AND function

J

John Pinback

If I name an array G2:G90 Used and a second array H2:H90 Allowed and put
logical values in these columns then I should be able to use the AND
function but it gives me the wrong answer.

For example, say G3 = TRUE and H3 = TRUE and I put the following formula in
I3:

= AND(Used, Allowed)

I expect to see TRUE in I3 but I get FALSE.

Thanks,
Karl
kwb AT dcm-va.com
 
G

Guest

So you want to return TRUE if adjacent cells are TRUE regardless of how many?

=SUMPRODUCT(--(Used=TRUE),--(Allowed=TRUE))>0

will do it

Otherwise if you are copying down in I checking each row and don't want to use
the cell references

=IF(ISERR(AND(INDEX(Used,ROW()),INDEX(Allowed,ROW()))),"",AND(INDEX(Used,ROW()),INDEX(Allowed,ROW())))

will retrun TRUE for 2 adjacent cells holding TRUE

Regards,

Peo Sjoblom
 
J

John Pinback

Bob,

I was able to get it to work by doing this:

AND(Used=TRUE, Allowed=TRUE)

Looks ugly but it works.

Thanks,
Karl
 
G

Guest

I am not sure what you are trying to do. If you are trying to just check if
G3 and H3 are true I would try
=and(G3,H3)

= AND(Used, Allowed)
will only give true if every cell in Used and Allowed has a true or is blank
 
G

Guest

this will only work for the first cell in each ranges. this is the same as
And(G2,H2)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top