Index Match Lookup of Partial words in one cell.

vstone

New Member
Joined
Sep 19, 2014
Messages
2
I have a simple question.... I think

I need to search multiple words in a in one cell.

As an Example. Cells A1-A5
Apple Store Chatswood R1
BigW R3
McDonalds R1
KFC R3
Pie Face R2

The words I am looking for are R1, R2, R3, R4, R5. These are in Cells B1-B5

In Column C I would like to list the values

Thanks
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Canapone

Active Member
Joined
May 10, 2007
Messages
463
Hi, in B1:B5 the list of substrings (R1-R2-R3...) to be searched in A2 A3 A4 ....

In C1 to be copied down

=IFERROR(INDEX($B$1:$B$5,MATCH(1,INDEX(SEARCH("*"&$B$1:$B$5&"*",A1),),0)),"")

Regards
 
Upvote 0

uk747

Well-known Member
Joined
Jul 20, 2011
Messages
771
Office Version
  1. 365
Platform
  1. Windows
doesnt it need to be
=IFERROR(INDEX($B$1:$B$5,MATCH(1,INDEX(SEARCH("*"&$a$1:$a$5&"*",A1),),0)),"")
 
Upvote 0

uk747

Well-known Member
Joined
Jul 20, 2011
Messages
771
Office Version
  1. 365
Platform
  1. Windows
ignore above i didnt realise Column A contained the R1, R2 etc as well

Apple Store Chatswood R1</SPAN>
BigW R3</SPAN>
McDonalds R1</SPAN>
KFC R3</SPAN>
Pie Face R2</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
 
Upvote 0

vstone

New Member
Joined
Sep 19, 2014
Messages
2
That was perfect. Thanks so much

Hi, in B1:B5 the list of substrings (R1-R2-R3...) to be searched in A2 A3 A4 ....

In C1 to be copied down

=IFERROR(INDEX($B$1:$B$5,MATCH(1,INDEX(SEARCH("*"&$B$1:$B$5&"*",A1),),0)),"")

Regards
 
Upvote 0

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
C1, just enter and copy down:

=LOOKUP(9.99999999999999E+307,SEARCH(" "&$B$1:$B$5&" "," "&$A1&" "),$B$1:$B$5)

which should be faster and won't confound R1 and say R11 or JR1.
 
Upvote 0

Forum statistics

Threads
1,191,178
Messages
5,985,145
Members
439,942
Latest member
bkexcel11230

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top