Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

Pull out zip code in excel

Posted on 2013-12-02
Medium Priority
376 Views
I have Column K that has thousands of zip code. Some of the zip codes are just the 5 digits and some are the 5 digits then a dash and 4 more digits.

I need to have a column of just the 5 digits, not the "dash-four more". Any way I can either delete the dash info or simply pull out the first 5 digits? For example:

Column K
93706
93722-2451
84487-5474
92653
87415-5474

Thanks!
0
Question by:cansevin
[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

LVL 9

Expert Comment

ID: 39690577
The formula is below.  Fill A1 with the specified cell.
=LEFT(K1, 5)
0

LVL 15

Accepted Solution

Giovanni Heward earned 2000 total points
ID: 39690584
Create a new column and use the LEFT function.

A1 = 10001-1001
B2 = LEFT(A1,5)
0

LVL 43

Expert Comment

ID: 39690600
You can also use
Data > Text to columns > Delimited > Use the "-" character
0

Featured Post

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Suggested Courses
Course of the Month9 days, 21 hours left to enroll