Macro to Split After "Apartment [0-9]"?

TatumLD

New Member
Joined
Dec 17, 2018
Messages
2
Hello, I receive address files from clients that are rarely formatted properly and usually have all their data pasted in 1 column. (See example below) I've made a macro that adds "|" at the end of Street, Ave, Road, etc and then splits into different columns but I can't figure out how to split again with things like "Apartment 301" or "Building 3 Box 49".

5927 Howe Street Apartment 301 Pittsburgh PA 15232
1540 West 50th Ave Denver, Colorado 80221
1101 West 4th Street Unit 40 Winston Salem, NC 27101
23 Virginia St. Saint-Isadore, NB E8M B2K CANADA
50 Main St. Building 3 Box 49 Portland, Ore. 97210
1921 Banbury Road Kalamazoo, MI 49001
24084 SE 146th Court #33 Beaver PA 15009

<colgroup><col></colgroup><tbody>
</tbody>

Any help would be greatly appreciated.
Tatum
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
FYI - I am printing envelopes with this info so I have to have the City, State, and Zip on one line.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

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