sorting

M

Melissa

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.
 
P

Peter Jamieson

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
 

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