Solved

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

Posted on 2016-07-26
8
53 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 31

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:Naresh Patel
Naresh Patel earned 125 total points
ID: 41730043
Text To ColumnNext - Next FinishThanks
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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:Naresh Patel
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

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!

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

724 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