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

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Sorry, hopefully this is a bit clearer....

[TABLE="width: 585"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]bghmondkj
[/TD]
[TD]MTL
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]98&^Tor89)(
[/TD]
[TD]TOR
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD](*^CbhKHJ
[/TD]
[TD]CHI
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]bru79087kll
[/TD]
[TD]BOS
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]List would be on worksheet2... something like this:
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]mon
[/TD]
[TD]MTL
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]Tor
[/TD]
[TD]TOR
[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]cbh
[/TD]
[TD]CHI
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]bru
[/TD]
[TD]BOS
[/TD]
[/TR]
</tbody>[/TABLE]


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,224,832
Messages
6,181,235
Members
453,026
Latest member
cknader

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