Parsing City, State, Zip from one cell

Artemis

New Member
Joined
Nov 21, 2011
Messages
6
I am having trouble figuring out how to parse city, state, and zipcode from one cell. I uploaded a list 18,000 cities, and there are a couple problems with the list. It has no common delimiter, nor a common length state name (like a two letter abbreviation).

Examples of the addresses are:

Stony Creek, New York 12878-1613
Dulles, Virginia 20166-6923
Sturgeon Bay, Wisconsin 54235-8308
Florence, Arizona 85132
...

(They are all in this format, but some zip codes are only five digits)

I am very unfamiliar with basic, so functions would be preferred. But any help is very much appreciated.

Thanks.
 
If the city is listed first and followed by a comma, you can split it there.
The zip code can be extracted by using right() and an if to detect any dash.
 
Upvote 0

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