need to separate addresses

dilleyo725

Board Regular
Joined
Jan 31, 2006
Messages
65
Hello,

I'm working with a pre-existing list of vendors and currently the addresses for each are in one column. I would like to separate by city, state, zip. I was thinking of text to columns but since the addresses are not all aligned that won't work.

Any suggestions?

thanks!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

dilleyo725

Board Regular
Joined
Jan 31, 2006
Messages
65
space betwee the physical address and city, then comma between city and state.

many inconsistencies with the format. Guessing multiple people were inputting originally.

123 hope st. cerritos, ca 90703

155 sad ave. long beach ca 90805
 
Upvote 0

adept

New Member
Joined
Feb 13, 2009
Messages
46
I usually start at the left with the ZIP (that is usually 5 chars) and then separate the following a bit at a time.

Code:
=right(A1,5)

Perhaps you can post a sample of your data?

Craig
 
Last edited:
Upvote 0

dilleyo725

Board Regular
Joined
Jan 31, 2006
Messages
65
can I just copy and paste a sample straight from the spreadsheet?
 
Upvote 0

dilleyo725

Board Regular
Joined
Jan 31, 2006
Messages
65
the "right" formula works for zip code but when it comes to city, it gets more complicated because even if I try using a "mid" formula, essentially that would mean I would have to count each character per line entry...correct?

Is there another way?
 
Upvote 0

adept

New Member
Joined
Feb 13, 2009
Messages
46
That's right.
I use formulas, don't know VB well enough.
I start from the known lengths (ZIP) and move in from the right.

Is the state always 2 chars?

Looks like the city and state are separated by a comma, sometimes. I would replace the commas with "" to delete them.

Using mid() you can work it out.

There are many smarter folks on the boards than me so I am awaiting to see what any of them can supply.
 
Upvote 0

Forum statistics

Threads
1,191,319
Messages
5,985,956
Members
439,992
Latest member
NCWalker

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
Top