#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default If AND Query

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default If AND Query

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


"John Moore" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default If AND Query

Try this:

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

Hope this helps.

Pete

On Jul 11, 3:40 pm, John Moore
wrote:
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



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default If AND Query

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


"John Moore" wrote in message
...
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



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default If AND Query

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?

"Pete_UK" wrote:

Try this:

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

Hope this helps.

Pete

On Jul 11, 3:40 pm, John Moore
wrote:
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






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default If AND Query

That shouldn't be the case. Try hitting F9 to recalculate.


"John Moore" wrote in message
...
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?

"Pete_UK" wrote:

Try this:

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

Hope this helps.

Pete

On Jul 11, 3:40 pm, John Moore
wrote:
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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing Data via Web Query - Can values be passed to query? [email protected] Excel Discussion (Misc queries) 5 May 9th 06 06:21 PM
Save data retreived from query without saving query Anthony Excel Discussion (Misc queries) 0 January 25th 06 07:17 PM
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? jocke Excel Discussion (Misc queries) 1 November 29th 05 01:44 PM
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? jocke Excel Discussion (Misc queries) 0 November 28th 05 06:37 PM
Microsoft Query rejects "nz" function in Access Query Vaughan Excel Discussion (Misc queries) 0 May 4th 05 05:20 PM


All times are GMT +1. The time now is 08:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"