Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / October 2007

Tip: Looking for answers? Try searching our database.

Zip Code field returns 00000 when nothing in field in from xls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kim - 02 Oct 2007 22:36 GMT
I am using Grant's formula for 5 and 9 digit zip codes:

{If{MERGEFIELD ZIP} > 99999 "{MERGEFIELD ZIP \# "00000'-'0000"}"
"{MERGEFIELD ZIP \# "00000"}}

And it works like a charm, except when the cell is empty in Excel. I
get "00000" instead of a blank field. How do I suppress the zeros when
there is nothing in the field?

Thanks!
Kim
macropod - 02 Oct 2007 23:00 GMT
Hi Kim,

Try adding two ';;' characters to the end of the 2nd mergefield field, thus:
{If{MERGEFIELD ZIP} > 99999 "{MERGEFIELD ZIP \# "00000'-'0000"}"
"{MERGEFIELD ZIP \# "00000;;"}}

Those extra characters control the formatting for negative and 0 values, respectively. Having nothing after each of them suppresses
the negative and 0 value display.

Cheers
Signature

macropod
[MVP - Microsoft Word]
-------------------------

>I am using Grant's formula for 5 and 9 digit zip codes:
>
[quoted text clipped - 7 lines]
> Thanks!
> Kim
Kim - 03 Oct 2007 14:30 GMT
> Hi Kim,
>
[quoted text clipped - 24 lines]
>
> - Show quoted text -

Worked like a charm! I can't thank you enough!

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.