Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Kim Kim is offline
external usenet poster
 
Posts: 4
Default Zip Code field returns 00000 when nothing in field in from xls

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

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default Zip Code field returns 00000 when nothing in field in from xls

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
--
macropod
[MVP - Microsoft Word]
-------------------------

"Kim" wrote in message oups.com...
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


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Kim Kim is offline
external usenet poster
 
Posts: 4
Default Zip Code field returns 00000 when nothing in field in from xls

On Oct 2, 5:00 pm, "macropod" wrote:
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
--
macropod
[MVP - Microsoft Word]
-------------------------



"Kim" wrote in ooglegroups.com...
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- Hide quoted text -


- Show quoted text -


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

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
Merge field link to database returns value w/255-character limit. Austin Mailmerge 1 November 8th 06 09:31 AM
Field code being displayed and not the field Ted Hill Microsoft Word Help 1 May 4th 06 09:01 PM
Word 2003 Field code within a field code Cheryl Mailmerge 2 November 25th 05 08:31 AM
Which field code? Annie Microsoft Word Help 2 November 25th 05 01:26 AM
MS Word 2002 Template - How to prevent Hard returns in text field. Tom Page Layout 3 January 27th 05 10:24 PM


All times are GMT +1. The time now is 07:55 AM.

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"