Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Pat Hughes
 
Posts: n/a
Default How do you sort zip codes with 0's being the lead number?

How do you sort zip codes where some of them start with 0? I have changed
the format to text, number, general with no luck. I would like to be able to
do this without having to put a ' in front of the number.
  #2   Report Post  
Richard Neville
 
Posts: n/a
Default

The secret is to find the special format for zip codes and format them all
that way. Select the cells with zips and delete all the ' marks, and - marks
if any, using the Replace function. Then go to Format-Cells. Click on the
Number tab and select Special. There is one format for 5-digit zips and
another for 9-digit (which automatically inserts the hyphen). If you enter a
zip beginning with a zero, the leading zero will show. They will sort from
00001 to 99999, but you will find you cannot mix 5- and 9-digit zips--use
one or the other but not both.

"Pat Hughes" <Pat wrote in message
...
How do you sort zip codes where some of them start with 0? I have changed
the format to text, number, general with no luck. I would like to be able
to
do this without having to put a ' in front of the number.



  #3   Report Post  
Pat Hughes
 
Posts: n/a
Default

Thanks for your quick reply. I'm sorry. I used zip codes as a way to avoid
writing so much out. But I have a column of numbers that some start with 0
and some with 00 and some with the number like 234. I need to sort these
where the 0's are in the right order in the beginning of the column.

Pat

"Richard Neville" wrote:

The secret is to find the special format for zip codes and format them all
that way. Select the cells with zips and delete all the ' marks, and - marks
if any, using the Replace function. Then go to Format-Cells. Click on the
Number tab and select Special. There is one format for 5-digit zips and
another for 9-digit (which automatically inserts the hyphen). If you enter a
zip beginning with a zero, the leading zero will show. They will sort from
00001 to 99999, but you will find you cannot mix 5- and 9-digit zips--use
one or the other but not both.

"Pat Hughes" <Pat wrote in message
...
How do you sort zip codes where some of them start with 0? I have changed
the format to text, number, general with no luck. I would like to be able
to
do this without having to put a ' in front of the number.




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


Similar Threads
Thread Thread Starter Forum Replies Last Post
sorting more than 3 keys Brooke Excel Discussion (Misc queries) 3 June 18th 05 04:52 AM
A sort of lookup or match lehigh46 Excel Worksheet Functions 1 February 26th 05 02:47 AM
Excel doesn't sort zip codes properly [email protected] Excel Discussion (Misc queries) 4 February 4th 05 12:30 AM
how do i format zip codes that lead with a "0" in excel for a wor. execl formatting Setting up and Configuration of Excel 1 February 3rd 05 10:24 PM
"-" ignored in sort Mike H Excel Discussion (Misc queries) 8 January 2nd 05 07:48 AM


All times are GMT +1. The time now is 09:31 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"