Macro for removing 2 characters words

HaoXu

New Member
Joined
Feb 17, 2017
Messages
14
Hi guys!:

I need really need your help for this.
I was looking for a macro that could automatically detect and remove 2 letter words (for example: or, if, hg, wa, rt, op...) in a selected range (it will be almost always in column A)

Also, i wanted to put this macro some words that it should not remove (because i work with some products with 2 letter brand such as LG, CH, DG...) I was thinking that i could add a list to this macro.

Thank you in advance guys!

Waiting for your replies.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
can i suggest you provide some before and after samples of what is the original text string and what is the after text string also provide us with 3 examples of allowed 2 letter strings so they can be used as example in the code someone may provide

see my signiture for how to add samples

eg

in and out we went to the top of the hilland out went the top hill
of one to many we see an answerone many see answer
df is gh is fe on offis is on offN.B. is and on allowed

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
Hi Akatrouble:

Sorry, i should have provided some samples before.
But you got the idea i wanted to transmit, your sample defines exactly what i'm looking for!
 
Upvote 0

Forum statistics

Threads
1,215,470
Messages
6,124,992
Members
449,201
Latest member
Lunzwe73

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