IF with multiple options alphanumeric

C

cisgalk

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
 
L

Luke M

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"))
 
J

Jacob Skaria

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
 
C

cisgalk

Jacob

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

cisgalk

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

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