• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 378
  • Last Modified:

Pull out zip code in excel

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
cansevin
Asked:
cansevin
1 Solution
 
BlueYonderCommented:
The formula is below.  Fill A1 with the specified cell.
=LEFT(K1, 5)
0
 
Giovanni HewardCommented:
Create a new column and use the LEFT function.

A1 = 10001-1001
B2 = LEFT(A1,5)
0
 
Saqib Husain, SyedEngineerCommented:
You can also use
Data > Text to columns > Delimited > Use the "-" character
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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now