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

samst

Board Regular
Joined
Feb 12, 2003
Messages
71
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.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Try something like:

F2, copied down:

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

where E2 houses a target string.
 
Upvote 0

Forum statistics

Threads
1,213,507
Messages
6,114,029
Members
448,543
Latest member
MartinLarkin

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