Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default Combining AND/OR in an IF statement

I have several columns that will contain either a "Y" or "N". I want to
check the columns to see if there is more than one "Y". How can I do this?
Is it possible to combine AND with OR in an IF statement, and how is it done?

C1 = Y
C2 = N
C3 = N
C4 = Y
C5 = Y
C6 = N

In C7 I want to check C1 thru C6 and indicate that there are 3 "Y"'s in
these columns.

Thanks for the help!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 430
Default Combining AND/OR in an IF statement

=COUNTIF(C1:C6,"Y")

Try the formula above in C7

"dread" wrote:

I have several columns that will contain either a "Y" or "N". I want to
check the columns to see if there is more than one "Y". How can I do this?
Is it possible to combine AND with OR in an IF statement, and how is it done?

C1 = Y
C2 = N
C3 = N
C4 = Y
C5 = Y
C6 = N

In C7 I want to check C1 thru C6 and indicate that there are 3 "Y"'s in
these columns.

Thanks for the help!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default Combining AND/OR in an IF statement

Wow that was too easy! Thank you very much!!!

"tim m" wrote:

=COUNTIF(C1:C6,"Y")

Try the formula above in C7

"dread" wrote:

I have several columns that will contain either a "Y" or "N". I want to
check the columns to see if there is more than one "Y". How can I do this?
Is it possible to combine AND with OR in an IF statement, and how is it done?

C1 = Y
C2 = N
C3 = N
C4 = Y
C5 = Y
C6 = N

In C7 I want to check C1 thru C6 and indicate that there are 3 "Y"'s in
these columns.

Thanks for the help!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Combining AND/OR in an IF statement

dread

What about

=COUNTIF(C1:C6,"=Y")

Dave
"dread" wrote in message
...
I have several columns that will contain either a "Y" or "N". I want to
check the columns to see if there is more than one "Y". How can I do this?
Is it possible to combine AND with OR in an IF statement, and how is it
done?

C1 = Y
C2 = N
C3 = N
C4 = Y
C5 = Y
C6 = N

In C7 I want to check C1 thru C6 and indicate that there are 3 "Y"'s in
these columns.

Thanks for the help!



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 430
Default Combining AND/OR in an IF statement

Just to explain that function if looks at C1 to C6 and if there is a Y it
counts the number of Y's.
Further to your 1st question yes you can do ORs and ANDs with IF's if you
have to. (In this instance the COUNTIF function works best though)


"dread" wrote:

Wow that was too easy! Thank you very much!!!

"tim m" wrote:

=COUNTIF(C1:C6,"Y")

Try the formula above in C7

"dread" wrote:

I have several columns that will contain either a "Y" or "N". I want to
check the columns to see if there is more than one "Y". How can I do this?
Is it possible to combine AND with OR in an IF statement, and how is it done?

C1 = Y
C2 = N
C3 = N
C4 = Y
C5 = Y
C6 = N

In C7 I want to check C1 thru C6 and indicate that there are 3 "Y"'s in
these columns.

Thanks for the help!

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
Combining Nested IF statement with Between operator Daisy Excel Worksheet Functions 3 October 29th 12 11:03 AM
Combining an If Statement with NETWORKDAYS function Shirley Munro Excel Discussion (Misc queries) 1 June 21st 06 12:42 PM
Combining a Vlook up with and If then statement Sweetetc Excel Worksheet Functions 14 May 2nd 06 09:06 PM
combining an if statement Ryder Excel Worksheet Functions 3 March 9th 05 06:21 PM
Combining SUM Function with Nested If Statement Somecallmejosh Excel Discussion (Misc queries) 3 December 6th 04 04:25 PM


All times are GMT +1. The time now is 07:01 PM.

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"