Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default sorting zip codes

hi,
in this reporti can't sort correctly the zip code, and sometime i can't
find
them when i search them with a function vlookup. wHY?
Pier

PROV ZIP CODE
TO 10052
TO 10056
TO 10060
AO 11021
VA 21013
VA 21013
BG 24030
BG 24063
VB 28900
VB 28900
VB 28900
VB 28900
VB 28900
VB 28900
VB 28900
VB 28900
UD 33013
TS 34123
BO 40050
AR 52010
AR 52040
NA 80056
BO 40024
BO 40024
BO 40024
BO 40025
BO 40025
BO 40026
BO 40026
BO 40026
BO 40026
BO 40027
BO 40027
BO 40030

RM 00100


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default sorting zip codes

and you would have to format them as 00000
so that numbers like 6300 would be 06300.

US zip codes from Italy, how interesting.

I would suggest formatting them as text and have a
FixUSzip5 macro to help with that.
http://www.mvps.org/dmcritchie/excel/join.htm#fixuszip5

Then you can include numbers like 06300-1222
mixed in with 06300 and they will sort correctly. Of course
this would not work have 5 digit and 9 digit codes if the purpose
is to use VLOOKUP. But using a text format would allow you
to use zip codes (or whatever other call them) from any part
of the world in the same column. Outside the US mostly familiar with
Canadian codes, and the system in England is really interesting,
all the more reason to use text.
--
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Dave Peterson" wrote in message ...
Make sure all of your data is the same type--all text or all numbers. (if you
want to convert the text to numbers, select an empty cell and copy it. Select
your range and do Edit|paste special|check Add.)

Do it to both the lookup list and the value used to look up.



Pier Luigi wrote:

hi,
in this reporti can't sort correctly the zip code, and sometime i can't
find
them when i search them with a function vlookup. wHY?
Pier

PROV ZIP CODE
TO 10052
TO 10056
TO 10060
AO 11021
VA 21013
VA 21013
BG 24030
BG 24063
VB 28900
VB 28900
VB 28900
VB 28900
VB 28900
VB 28900
VB 28900
VB 28900
UD 33013
TS 34123
BO 40050
AR 52010
AR 52040
NA 80056
BO 40024
BO 40024
BO 40024
BO 40025
BO 40025
BO 40026
BO 40026
BO 40026
BO 40026
BO 40027
BO 40027
BO 40030

RM 00100


--

Dave Peterson



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 zip codes Carol Lei Excel Worksheet Functions 1 August 13th 09 04:26 PM
Zip Codes Bill New Users to Excel 6 August 7th 08 10:47 PM
VB Codes bowling Excel Discussion (Misc queries) 0 July 30th 07 07:02 PM
Sorting by 5 digit & 5 digit plus 4 zip codes D Marie Excel Worksheet Functions 1 August 22nd 06 05:17 PM
ZIP CODES js42 Excel Worksheet Functions 2 August 5th 05 03:59 PM


All times are GMT +1. The time now is 07:01 PM.

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"