#1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Melissa Melissa is offline
external usenet poster
 
Posts: 75
Default sorting

I have Microsoft Office Word 2003 & Microsoft Office Excel 2003. I have a
database of addresses in Excel that I need to print labels for, in zip code
order. How can I get the zip + 4 codes to sort in with the 5 digit zip
codes, instead of after the highest 5 digit zip code? I would be happy to
sort them in either Excel or in the mail merge. Thanks.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default sorting

You can try this:
a. instead of formatting your zip code column as 4-digit and 9-digit ZIP
codes. format it as General
b. enter 5 digit codes as e.g. 123450000, i.e. pad them on the right to 9
digits
c. enter 9 digit codes without the -, e.g. 123456789
d. you should then have a column that will sort in a useful way either in
Excel or Word
e. in Word, suppose the column is called z. use

{ IF { =int({ MERGEFIELD z }/10000)*10000 } = { MERGEFIELD z }
"{ ={ MERGEFIELD z }/10000 \#00000 }" "{ MERGEFIELD z \#00000'-'0000 }" }

(I feel sure there is a simpler way, but that should do it. Or you could use

{ IF { MERGEFIELD z } = "*0000"
"{ ={ MERGEFIELD z }/10000 \#00000 }" "{ MERGEFIELD z \#00000'-'0000 }" }

as long as no 9-digit code can end in "0000"

Peter Jamieson

"Melissa" wrote in message
...
I have Microsoft Office Word 2003 & Microsoft Office Excel 2003. I have a
database of addresses in Excel that I need to print labels for, in zip
code
order. How can I get the zip + 4 codes to sort in with the 5 digit zip
codes, instead of after the highest 5 digit zip code? I would be happy to
sort them in either Excel or in the mail merge. Thanks.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I FOLLOWED DIRECTIONS FOR SORTING AND MY COL. IN THE TABLE WONT S EILEENE Tables 2 October 22nd 06 08:54 PM
sorting text in a table Madame D Tables 1 November 7th 05 05:49 PM
Need option to ignore quotation marks in sorting bibliography. Syntactician Microsoft Word Help 1 July 6th 05 11:17 PM
Sorting a table while keeping some related rows together Dan Corban Tables 7 January 20th 05 07:31 PM
Sorting - Toolbar or Menubar? Hélène Tables 4 January 6th 05 06:25 PM


All times are GMT +1. The time now is 06:41 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"