Search formula with lookup

bobby_smith

Board Regular
Joined
Apr 16, 2014
Messages
90
Hi All,

I'm trying to write an alternative to formula below:
If(isnumber(search ("Item1",a2)),"Result1",if(isnumber(search("Item2",a2)),"Result2",if(.....

The formula is looking for a specific word in string of text and if found, returning a result.

I'm looking for a more efficient way in the event I have a long list of words I would like to search for and not having to write a long If formula.

I was thinking that I can integrate the search into a Vlookup / Lookup/ Index Match formula so that once the word is found in the string, I can lookup from a table.
I've however not been able to create such a formula.

Your assistance will be greatly appreciated.

Thanks
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Create a table Item - Result and use LOOKUP

Something like this - table in columns D:E


A
B
C
D
E
1
Text​
Result​
ITEM​
RESULT​
2
blah item3​
Result3​
Item1​
Result1​
3
item2 blah blah​
Result2​
Item2​
Result2​
4
item1​
Result1​
Item3​
Result3​
5
blah item5 blah​
Result5​
Item4​
Result4​
6
Item5​
Result5​
7

Formula in B2 copied down
=LOOKUP(9.99E+307,SEARCH(D$2:D$6,A2),E$2:E$6)

M.
 
Upvote 0

Forum statistics

Threads
1,216,157
Messages
6,129,195
Members
449,493
Latest member
JablesFTW

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
Back
Top