PDA

View Full Version : Solved: Find multiple values in range



JohnyG
11-05-2008, 12:05 AM
I need to find codes like ?ach?, ?vim?, ?rck? etc in Reference column (Column B). If found any of the above codes then paste that code (vim or ach or rck) in next column(Column C).
For instance:

B2 contains ?07-08/1429/vim/rsh/sub? so vim needs to be pasted in C2. In case if none of the code found then in column C it will display ?Not found?.

Sample data and output is attached.

Regards,
Johny

rbrhodes
11-05-2008, 12:51 AM
Hi Johny,

Take a look.

Bob Phillips
11-05-2008, 01:51 AM
You can do it without VBA

=IF(SUM(COUNTIF(B2,{"*ach*","*rck*","*vim*"}))=0,"",INDEX({"ach","rck","vim"},MATCH(1,COUNTIF(B2,{"*ach*","*rck*","*vim*"}),0)))

JohnyG
11-05-2008, 01:55 AM
Thanks a lot rbrhodes and xld,

Both ways it solves the issue. Thanks a lot . :clap: :clap: :clap:

Regards,
Johny

escu
11-05-2008, 09:53 AM
can't see solution in posted spreadsheet

escu
11-05-2008, 09:54 AM
sorry, got it