Search for specific list of words in a column and return specified values in another column

samst

Board Regular
Joined
Feb 12, 2003
Messages
69
Hi There I've been searching through the forum (please feel free to point me to the right post if I missed it) and couldn't find what I was looking for so I was wondering if someone might be able to help.

Trying to identify a macro that will search a column of cells for certain words and if it finds one of those words it will return a specific value in another column. For example:

Column A
Twister
Rainstorm
Thunderstorm
Clear day

If the macro finds the word "Thunderstorm" I would like it to return the word "Cloudy" in column B but if it finds the word "Twister" it should return the word "Tornado" etc..

Basically I want to be able to add to the list of words to search for and specify what value it should return.

ANY help would be greatly appreciated.
 

Some videos you may like

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
Try something like:

F2, copied down:

=LOOKUP(9.99999999999999E+307,SEARCH(" "&WordList&" "," "&E2&" "),WordList)

where E2 houses a target string.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,176
Messages
5,600,146
Members
414,365
Latest member
UUR

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