?
Solved

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

Posted on 2016-07-26
8
Medium Priority
?
55 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 1000 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 33

Assisted Solution

by:Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj) earned 500 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 500 total points
ID: 41730043
Text To ColumnNext - Next FinishThanks
0
Industry Leaders: 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: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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

649 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