Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 128
Default Searching for an additional item via an IF statement

I've got the following formula in column O which is designed to find any
variance of the specified company names in column C and enters "Y", otherwise
enters "N".

Another company has joined since writing this, so I'd like to include them
in the list. I'm aware that you can only have up to 7 IF statements,
therefore how can I accommodate Company G when my formula is already maxed
out? - I thought that maybe I could include an OR statement, i.e
IF(ISNUMBER(SEARCH(OR("*Company A*","Company B*"... but this doesn't seem to
work for me?

IF(ISNUMBER(SEARCH("*Company A*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
B*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
C*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
D*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
E*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company F*",C4)),"Y","N"))))))

Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Searching for an additional item via an IF statement

=IF(SUMPRODUCT(COUNTIF(C4,{"*Company A*","*Company B*","*Company
C*","*Company D*","*Company E*","*Company F*","*Company G*"}))0,"Y","N")

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Sarah (OGI)" wrote in message
...
I've got the following formula in column O which is designed to find any
variance of the specified company names in column C and enters "Y",
otherwise
enters "N".

Another company has joined since writing this, so I'd like to include them
in the list. I'm aware that you can only have up to 7 IF statements,
therefore how can I accommodate Company G when my formula is already maxed
out? - I thought that maybe I could include an OR statement, i.e
IF(ISNUMBER(SEARCH(OR("*Company A*","Company B*"... but this doesn't seem
to
work for me?

IF(ISNUMBER(SEARCH("*Company A*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
B*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
C*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
D*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
E*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company F*",C4)),"Y","N"))))))

Any ideas?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Searching for an additional item via an IF statement

=IF(SUM(COUNTIF(C4,"*Company
"&{"A*","B*","C*","D*","E*","F*","G*"}))0,"Y","N" )


"Sarah (OGI)" wrote:

I've got the following formula in column O which is designed to find any
variance of the specified company names in column C and enters "Y", otherwise
enters "N".

Another company has joined since writing this, so I'd like to include them
in the list. I'm aware that you can only have up to 7 IF statements,
therefore how can I accommodate Company G when my formula is already maxed
out? - I thought that maybe I could include an OR statement, i.e
IF(ISNUMBER(SEARCH(OR("*Company A*","Company B*"... but this doesn't seem to
work for me?

IF(ISNUMBER(SEARCH("*Company A*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
B*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
C*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
D*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
E*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company F*",C4)),"Y","N"))))))

Any ideas?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 128
Default Searching for an additional item via an IF statement

Thank you both so much!! - that works great!

"Teethless mama" wrote:

=IF(SUM(COUNTIF(C4,"*Company
"&{"A*","B*","C*","D*","E*","F*","G*"}))0,"Y","N" )


"Sarah (OGI)" wrote:

I've got the following formula in column O which is designed to find any
variance of the specified company names in column C and enters "Y", otherwise
enters "N".

Another company has joined since writing this, so I'd like to include them
in the list. I'm aware that you can only have up to 7 IF statements,
therefore how can I accommodate Company G when my formula is already maxed
out? - I thought that maybe I could include an OR statement, i.e
IF(ISNUMBER(SEARCH(OR("*Company A*","Company B*"... but this doesn't seem to
work for me?

IF(ISNUMBER(SEARCH("*Company A*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
B*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
C*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
D*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
E*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company F*",C4)),"Y","N"))))))

Any ideas?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Searching for an additional item via an IF statement

You're Welcome!

"Sarah (OGI)" wrote:

Thank you both so much!! - that works great!

"Teethless mama" wrote:

=IF(SUM(COUNTIF(C4,"*Company
"&{"A*","B*","C*","D*","E*","F*","G*"}))0,"Y","N" )


"Sarah (OGI)" wrote:

I've got the following formula in column O which is designed to find any
variance of the specified company names in column C and enters "Y", otherwise
enters "N".

Another company has joined since writing this, so I'd like to include them
in the list. I'm aware that you can only have up to 7 IF statements,
therefore how can I accommodate Company G when my formula is already maxed
out? - I thought that maybe I could include an OR statement, i.e
IF(ISNUMBER(SEARCH(OR("*Company A*","Company B*"... but this doesn't seem to
work for me?

IF(ISNUMBER(SEARCH("*Company A*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
B*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
C*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
D*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
E*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company F*",C4)),"Y","N"))))))

Any ideas?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Searching for an additional item via an IF statement

List the company names in a range of cells.

F2:F7 = company names

=IF(COUNT(LOOKUP(2,1/SEARCH(F2:F7,C4))),"Y","N")

--
Biff
Microsoft Excel MVP


"Sarah (OGI)" wrote in message
...
I've got the following formula in column O which is designed to find any
variance of the specified company names in column C and enters "Y",
otherwise
enters "N".

Another company has joined since writing this, so I'd like to include them
in the list. I'm aware that you can only have up to 7 IF statements,
therefore how can I accommodate Company G when my formula is already maxed
out? - I thought that maybe I could include an OR statement, i.e
IF(ISNUMBER(SEARCH(OR("*Company A*","Company B*"... but this doesn't seem
to
work for me?

IF(ISNUMBER(SEARCH("*Company A*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
B*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
C*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
D*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company
E*",C4)),"Y",IF(ISNUMBER(SEARCH("*Company F*",C4)),"Y","N"))))))

Any ideas?



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
Item numbers result in item description in next field in Excel Cheryl MM Excel Worksheet Functions 1 February 20th 07 03:51 PM
Searching, matching then searching another list based on the match A.S. Excel Discussion (Misc queries) 1 December 13th 06 05:08 AM
Identifying an item in one col/row and searching an entire spreads Bennie Excel Worksheet Functions 0 August 19th 05 01:49 AM
Searching for a criteria in array of cells within an IF statement selvaraj Excel Worksheet Functions 1 July 28th 05 03:36 PM
Selecting an Item from a List and getting a different item to pop. Matt Excel Worksheet Functions 1 December 7th 04 02:37 PM


All times are GMT +1. The time now is 01:42 AM.

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

About Us

"It's about Microsoft Excel"