What function should I use to convert 43232- to 43232

G

galsaba

On the zip codes on the column Zip are in the structure of:
nnnnn- (for example, "07444-") .
What would be the function to get rid of all these "-"?

On a differnt spreadsheet I have the zips as nnnnn-mmmm.
I want to keep the nnnnn only. What function should I use?

galsaba
 
B

Bob Phillips

=SUBSTITUTE(A1,"-","")

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
R

Ragdyer

You could try this for both questions:

=LEFT(A1,5)

OR
You could use <Data> <TextTo Columns>,
Where you choose the "Fixed Width" option.
Position the "Break Line" to separate the first 5 digits,
Then, on the next page of the wizard,
Click on Text, to retain the leading zeroes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top