Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to extract zip code from data

Status
Not open for further replies.

althea

MIS
Oct 15, 2001
134
US
I have an address in many cells in a list and need to have the last 5 digits (which is the zip code) extracted into a cell by itself. I tried extracting numbers from alphanumeric strings but that also pulls the numbers in the street address. Any ideas? Thanks!!
 
=RIGHT(<cell number>,5)

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Thanks! Do you know why after entering the formula nothing appears in the cell?
 
Just realized it's because there are spaces after the zip code. Trying to figure out a way to remove any characters after the zip code.
 




Please post the exact formula you entered (copy 'n' paste)

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Go to the source cell and see if there are 5 (or more) trailing spaces.

If so, you can use the TRIM function to remove them.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Three posts at the same time! exciting.

althea, as I said, you can use the TRIM function. (Trim(a1) and fill down)

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Just used TRIM and it worked. Thanks so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top