zipcode formatted in Excel (w+4) will not print in Word mailmerge

  • Thread starter Nancy Elizabeth Brown-Smith
  • Start date
N

Nancy Elizabeth Brown-Smith

Set up Excel phone book for family. Zipcode field is formatted (zipcode +4)
Set up Word document to utilize mail merge to create labels.
Inserted all desired fields.
When documents merged, zipcode on labels appears in "raw" form with out
formatting (no dash before last four digits).
What needs to be done in Word?
 
H

Harlan Grove

Set up Excel phone book for family. Zipcode field is formatted (zipcode
+4)
Set up Word document to utilize mail merge to create labels.
Inserted all desired fields.
When documents merged, zipcode on labels appears in "raw" form with out
formatting (no dash before last four digits).
What needs to be done in Word?

To fix the problem in Word, you'd need relatively complicated VBA to replace
the zip code values coming through from Excel with formatted
representations, e.g., get x from Excel, use Format(x, "00000\-0000") in
Word, but I don't know how you'd handle that through mail merge.

MUCH EASIER to fix this in Excel, treating zipcodes as TEXT rather than
formatted numbers, so zip codes like 01234-0056 would be entered as

'01234-0056

*with* the leading single quote (or give the zip code cells the number
format Text). Then Excel would pass the intended zip codes along to Word. As
for a quick fix in Excel, if all your zip codes were in K2:K101 and column X
were blank, in X2 enter the formula =TEXT(K2,"00000\-0000"), fill X2 down
into X3:X101, copy X2:X101, select K2:K101 and paste special as values. Then
clear X2:X101.
 

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