Change (or replace) a String to Different Format

Tash Point O

New Member
Joined
Feb 12, 2018
Messages
47
Hello!

I have recorded a macro to find an exact string and replace it to a different format. However, I have different strings and in the macro I would have to put in all the different variations in order for the macro to work. Is there another way I can change various strings to a certain format. Here is the example of what the heck I'm talking about. I need to change Column A's format to Column B's format.

2eyi5vp.jpg
[/IMG]


Here is the macro I recorded, as you can see, I'd have to put in every instance for strings from Column A:
waq43r.jpg
[/IMG]
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Try the Flash Fill tool. In your example above, you have your data in column A. Put 1 or 2 samples of how you want the output to look, say in B2. Select B2, go to the Data tab, and click on the Flash Fill button (or just press Ctrl-E). It should fill the rest of the rows in column B automatically.
 
Last edited:
Upvote 0
Try the Flash Fill tool. In your example above, you have your data in column A. Put 1 or 2 samples of how you want the output to look, say in B2. Select B2, go to the Data tab, and click on the Flash Fill button (or just press Ctrl-E). It should fill the rest of the rows in column B automatically.


Yes! this works!
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,632
Latest member
jladair

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