Creating a Mass Replacement Macro According to Arbitrary Conversion Parameters

verbconjugator

New Member
Joined
Jun 15, 2015
Messages
2
So, I have a 40x2 table of non-systematic strings to be converted to other strings - think "LM" needs to become "2P9" and "ATT" needs to be "Y4," all just according to this table. I have long groups of things that need to be convered seperated by dashes (so something like "LM-ATT-etc-etc-etc," which should become "2P9-Y4-etc-etc-etc") but housed together in one field. I want to write a macro that goes through and automatically changes every "LM" type thing into a "2P9" category one, and that also converts the dashes to semicolons in one go.

Help appreciated, thanks!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Additionally, the dash-seperated groups of things don't always contain the same number of elements... I just need the code to iterate over and replace all of the eligible ones.
 
Upvote 0

Forum statistics

Threads
1,214,431
Messages
6,119,458
Members
448,899
Latest member
maplemeadows

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