Solved

How do I reformat "City, State" into separate columns of City and State in Excel?

Posted on 2016-07-26
8
51 Views
Last Modified: 2016-07-26
The following data exists in one cell:

City/State
Washington, DC
Washington, DC
Washington, DC
Washington, DC
Washington, DC
Arlington, VA
Arlington, VA
Springfield, VA
Springfield, VA
Springfield, VA
Washington, DC
Newington, VA
Lorton, VA
Fairfax, VA

I need to format it so the City information is in one cell and the state abbreviation is in another.
0
Comment
Question by:impala6
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 5

Accepted Solution

by:
Eric C earned 250 total points
ID: 41730037
Easy. In Excel 2007(?) and higher, there is a button called 'Text To Columns'

1. Highlight the entire column (single click on the column letter)
2. In the Data tab, click the 'Text to Columns' button
3. In the dialog box, deselect 'Tab' and select 'Comma'
4. Click 'Next'

See screen shot.
text-to-columns.jpg
1
 
LVL 30

Assisted Solution

by:Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj) earned 125 total points
ID: 41730040
Please follow these steps...

1) Select the column with City/State strings

2) Make sure that the next adjacent column is blank, if not, insert a new column.

3) Go to Data Tab --. Text to Columns

4) Choose Delimited --> Next --> Check the checkbox for comma --> Next --> Finish
1
 
LVL 8

Assisted Solution

by:itjockey
itjockey earned 125 total points
ID: 41730043
Text To ColumnNext - Next FinishThanks
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:efrimpol
ID: 41730046
Column A, Column B, Column C - Record starts Cell A2

Column A = "Washington, DC"
Column B = "=LEFT(A2, SEARCH(",",A2,1))"
Column C = "=RIGHT(A2,LEN(A2)-SEARCH(",",A2,1))"

Results in Column B2 = "Washington"
Results in Column C2 = "DC"
1
 
LVL 6

Expert Comment

by:efrimpol
ID: 41730049
Typo - Record starts in Cell A1, not A2
1
 
LVL 8

Expert Comment

by:itjockey
ID: 41730051
zings too fast man....i am just about creating snaps & posting....   :)   after posting i see two post by others...
0
 
LVL 6

Expert Comment

by:efrimpol
ID: 41730053
see screenshot
0
 
LVL 6

Expert Comment

by:efrimpol
ID: 41730054
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question