Tell users how to sort 5 digit and 9 digit zipcodes correctly aft.

G

Guest

After applying special format to column to accommodate 5 and 9 digit
zipcodes, I was not able to sort by zipcode correctly. I added leading zeros
to 4 digit zipcodes to make them 5 digit. My 5 digit zip codes appear before
my 9 digit zip codes when I sort by ascending order.
 
C

CLR

Concatenate -0000 into your 5 diget numbers in a hellper column, with

=IF(LEN(A1)>5,A1,A1&"-0000") then Copy > Pastespecial > Values
this will give 11111-0000 for a 5 diget code of 11111.............

then select both columns and sort on the new one.........then delete the new
column if desired........

Vaya con Dios,
Chuck, CABGx3


"(e-mail address removed)"
 

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