Search From List - Macro

CONFUSED_AS_USUAL

Board Regular
Joined
Jul 6, 2017
Messages
59
Hi,

I know how to search the contents of a cell that contains a specific string and replace it. However, I do not know how to do this using a macro with a list for multiple searches.

However, I would like the same thing done, but from a list.

Example - worksheet1

A B
1 bghmondkj MTL
2 98&^Tor89)( TOR
3 (*^CbhKHJ CHI
4 bru79087kll BOS

List would be on worksheet2... something like this:


A B
1 mon MTL
2 Tor TOR
3 cbh CHI
4 bru BOS


It's probably something kind of simple, but it's beyond my knowledge.

Thanks
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Sorry, hopefully this is a bit clearer....

A
B
1
bghmondkj
MTL
2
98&^Tor89)(
TOR
3
(*^CbhKHJ
CHI
4
bru79087kll
BOS


List would be on worksheet2... something like this:





A
B
1
mon
MTL
2
Tor
TOR
3cbh
CHI
4
bru
BOS

<tbody>
</tbody>


Hi,

I know how to search the contents of a cell that contains a specific string and replace it. However, I do not know how to do this using a macro with a list for multiple searches.

However, I would like the same thing done, but from a list.

Example - worksheet1

A B
1 bghmondkj MTL
2 98&^Tor89)( TOR
3 (*^CbhKHJ CHI
4 bru79087kll BOS

List would be on worksheet2... something like this:


A B
1 mon MTL
2 Tor TOR
3 cbh CHI
4 bru BOS


It's probably something kind of simple, but it's beyond my knowledge.

Thanks
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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