Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default Tell users how to sort 5 digit and 9 digit zipcodes correctly aft.

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.
  #2   Report Post  
CLR
 
Posts: n/a
Default

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


"
om wrote in message
...
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"