If AND Query

G

Guest

Hi guys,

How do I return a Y or N answer based on the following. Formula in cell C1
to return either B or C depending on the content of cells A1 and B1 ,,, so if
A1 and B1 = N then return B ,,, if not then return C.
A B C
1 N N B
2 N Y C
3 N N B
 
P

PCLIVE

Not sure about the "How do I return a Y or N answer" since it seems you want
"B" or "C". But it seems you want this:

=IF(AND(A1="N",B1="N"),"B","C")

Another way:
=IF(COUNTIF(A1:B1,"N")=2,"B","C")

HTH,
Paul
 
G

Guest

This works in that when both A1 and B1 = N the formula returns B ,,, but when
they don't both contiain N it still returns B .....when it should return C
...... any thoughts?
 

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