Split a City, State, ZIP Address into Separate Columns

Excel Formulas › Data Cleaning

All versions

Mailing lists often cram City, State, and ZIP into one cell. A few text functions split them cleanly into their own columns — no Text-to-Columns wizard needed.


Quick formula: Grab the city as everything before the comma:
=LEFT(A2,FIND(",",A2)-1)

FIND locates the comma; LEFT keeps everything to its left.

Functions used (tap for the full reference guide):

The example

A single cell holds 'City, ST 12345' and you want three columns.

ABCD
1AddressCityStateZIP
2Dallas, TX 75201DallasTX75201
3Austin, TX 78701AustinTX78701

The formula

Three formulas, one for each part:

=MID(A2,FIND(",",A2)+2,2) // two letters after the comma = state

How it works

The pattern 'City, ST ZIP' is predictable, so position math works:

  1. City: LEFT(A2,FIND(",",A2)-1) keeps everything before the comma.
  2. State: MID(A2,FIND(",",A2)+2,2) skips the comma and space, then takes two letters.
  3. ZIP: RIGHT(A2,5) grabs the last five characters.
  4. Each formula reads the same source cell, so all three columns fill together.

If your data has 9-digit ZIPs, change RIGHT(A2,5) to TEXTAFTER(A2," ",-1) to grab the last chunk.

Try it: interactive demo

Interactive

Type a 'City, ST ZIP' address — watch the three parts split out.

Variations

ZIP with TEXTAFTER

Grab whatever follows the last space, so 5- and 9-digit ZIPs both work.

=TEXTAFTER(A2," ",-1)

Trim stray spaces first

Wrap each result in TRIM if the source has inconsistent spacing.

=TRIM(LEFT(A2,FIND(",",A2)-1))

Pitfalls & errors

This assumes the 'City, ST ZIP' layout. Addresses with no comma or extra commas need a different rule.

A missing comma makes FIND return #VALUE!. Wrap formulas in IFERROR if your list is messy.

Practice workbook

📊
Download the free Split a City, State, ZIP Address into Separate Columns practice workbook
Edit the yellow addresses; City, State, and ZIP re-split automatically.

Frequently asked questions

Can't I just use Text to Columns?
You can for a one-time split, but formulas update live as the source changes and don't overwrite neighbouring columns.
What about street addresses on a separate line?
If the full address is one cell with line breaks, split on CHAR(10) first, then apply this to the last line.
How do I handle two-word cities?
This works fine — LEFT keeps everything up to the comma, including spaces, so 'Fort Worth' stays intact.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Split first and last name · Extract the file extension

Function references: LEFTMIDRIGHTFIND