Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default IF with multiple options alphanumeric

Hello everyone,

Hoping someone can help me with this one - it has me stumped.

I have a spreadsheet that has an overall category in row 3, with
subcategories under in rows 4 through 10

In cells B4:B10 are alpha values: "Level 1", "Level 2", or "Level 1&2"

Here is what I would like to appear in cell B3:
If "Level 1&2" appears anywhere in B4:B10, returns "Level 1&2"
If "Level 1" and "Level 2" appear over the range B4:B10, returns "Level 1&2"
If only "Level 1" appears anywhere over range B4:B10, returns "Level 1"
If only "Level 2" appears anywhere over range, returns "Level 2"

Does anyone know a formula that will work for this?
Thanks


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default IF with multiple options alphanumeric

How about this?

=IF(COUNTIF(B4:B10,"Level 1")=ROWS(B4:B10),"Level
1",IF(COUNTIF(B4:B10,"Level 2")=ROWS(B4:B10),"Level 2","Level 1&2"))
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"cisgalk" wrote:

Hello everyone,

Hoping someone can help me with this one - it has me stumped.

I have a spreadsheet that has an overall category in row 3, with
subcategories under in rows 4 through 10

In cells B4:B10 are alpha values: "Level 1", "Level 2", or "Level 1&2"

Here is what I would like to appear in cell B3:
If "Level 1&2" appears anywhere in B4:B10, returns "Level 1&2"
If "Level 1" and "Level 2" appear over the range B4:B10, returns "Level 1&2"
If only "Level 1" appears anywhere over range B4:B10, returns "Level 1"
If only "Level 2" appears anywhere over range, returns "Level 2"

Does anyone know a formula that will work for this?
Thanks


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default IF with multiple options alphanumeric

Try
=IF(AND(COUNTIF(B4:B10,"*1*"),COUNTIF(B4:B10,"*2*" )),"Level 1 &
2",IF(COUNTIF(B4:B10,"*1*"),"Level 1",IF(COUNTIF(B4:B10,"*2*"),"Level 2","")))

If this post helps click Yes
---------------
Jacob Skaria


"cisgalk" wrote:

Hello everyone,

Hoping someone can help me with this one - it has me stumped.

I have a spreadsheet that has an overall category in row 3, with
subcategories under in rows 4 through 10

In cells B4:B10 are alpha values: "Level 1", "Level 2", or "Level 1&2"

Here is what I would like to appear in cell B3:
If "Level 1&2" appears anywhere in B4:B10, returns "Level 1&2"
If "Level 1" and "Level 2" appear over the range B4:B10, returns "Level 1&2"
If only "Level 1" appears anywhere over range B4:B10, returns "Level 1"
If only "Level 2" appears anywhere over range, returns "Level 2"

Does anyone know a formula that will work for this?
Thanks


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default IF with multiple options alphanumeric

Jacob

Perfect, works perfectly, thanks so much. I didn't think about using
wildcards.



"Jacob Skaria" wrote:

Try
=IF(AND(COUNTIF(B4:B10,"*1*"),COUNTIF(B4:B10,"*2*" )),"Level 1 &
2",IF(COUNTIF(B4:B10,"*1*"),"Level 1",IF(COUNTIF(B4:B10,"*2*"),"Level 2","")))

If this post helps click Yes
---------------
Jacob Skaria


"cisgalk" wrote:

Hello everyone,

Hoping someone can help me with this one - it has me stumped.

I have a spreadsheet that has an overall category in row 3, with
subcategories under in rows 4 through 10

In cells B4:B10 are alpha values: "Level 1", "Level 2", or "Level 1&2"

Here is what I would like to appear in cell B3:
If "Level 1&2" appears anywhere in B4:B10, returns "Level 1&2"
If "Level 1" and "Level 2" appear over the range B4:B10, returns "Level 1&2"
If only "Level 1" appears anywhere over range B4:B10, returns "Level 1"
If only "Level 2" appears anywhere over range, returns "Level 2"

Does anyone know a formula that will work for this?
Thanks


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default IF with multiple options alphanumeric

I probably should have specified that there may be no data also. Thanks
though - did get the solution.

"Luke M" wrote:

How about this?

=IF(COUNTIF(B4:B10,"Level 1")=ROWS(B4:B10),"Level
1",IF(COUNTIF(B4:B10,"Level 2")=ROWS(B4:B10),"Level 2","Level 1&2"))
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"cisgalk" wrote:

Hello everyone,

Hoping someone can help me with this one - it has me stumped.

I have a spreadsheet that has an overall category in row 3, with
subcategories under in rows 4 through 10

In cells B4:B10 are alpha values: "Level 1", "Level 2", or "Level 1&2"

Here is what I would like to appear in cell B3:
If "Level 1&2" appears anywhere in B4:B10, returns "Level 1&2"
If "Level 1" and "Level 2" appear over the range B4:B10, returns "Level 1&2"
If only "Level 1" appears anywhere over range B4:B10, returns "Level 1"
If only "Level 2" appears anywhere over range, returns "Level 2"

Does anyone know a formula that will work for this?
Thanks


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
Multiple options- answer in single cel Peterest Excel Discussion (Misc queries) 2 January 12th 09 03:33 PM
Using Multiple Options to Define Outputs LHP Excel Discussion (Misc queries) 1 October 30th 08 01:38 PM
same options for multiple charts Jess Charts and Charting in Excel 3 November 29th 06 04:46 AM
Data Validation - Multiple Options LPS Excel Discussion (Misc queries) 8 August 11th 06 03:16 PM
parameter query - multiple options GregCrossan Excel Discussion (Misc queries) 0 September 22nd 05 08:04 PM


All times are GMT +1. The time now is 07:37 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"