Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Lyn Lyn is offline
external usenet poster
 
Posts: 40
Default Suppressing zeros in a mail merge document

I am attempting to merge data from Excel into a word document (table). I
have the zeros suppressed in Excel. However, after the merge, the word
document shows zeros when I would prefer blanks. How do I suppress the
zeros? If I have to use an IF statement in the merge document, what is its
syntax?

PS This was not a problem in Word 2003.
--
Lyn
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Suppressing zeros in a mail merge document

Add the following formatting switch to the mergefield

\# ",#.00;(,#.00);"

That will give you numbers to two decimal places with a thousands separator,
with negative numbers in parentheses and a blank for a zero.

Delete the .00 if you don't want the decimals places.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Lyn" wrote in message
...
I am attempting to merge data from Excel into a word document (table). I
have the zeros suppressed in Excel. However, after the merge, the word
document shows zeros when I would prefer blanks. How do I suppress the
zeros? If I have to use an IF statement in the merge document, what is
its
syntax?

PS This was not a problem in Word 2003.
--
Lyn



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Lyn Lyn is offline
external usenet poster
 
Posts: 40
Default Suppressing zeros in a mail merge document

Thankyou for your help so far.

In my Excel data file, the data consists of grades (A+ to E-) or a
blank/zero if the test has not been completed. In other words, my data is
not always numeric. Will that formatting switch work with the non-numeric
data?
--
Lyn


"Doug Robbins - Word MVP" wrote:

Add the following formatting switch to the mergefield

\# ",#.00;(,#.00);"

That will give you numbers to two decimal places with a thousands separator,
with negative numbers in parentheses and a blank for a zero.

Delete the .00 if you don't want the decimals places.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Lyn" wrote in message
...
I am attempting to merge data from Excel into a word document (table). I
have the zeros suppressed in Excel. However, after the merge, the word
document shows zeros when I would prefer blanks. How do I suppress the
zeros? If I have to use an IF statement in the merge document, what is
its
syntax?

PS This was not a problem in Word 2003.
--
Lyn




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Suppressing zeros in a mail merge document

No, it will only work with numeric data. You need a conditional field.
Assuming a fieldname 'Grade'

{IF {Mergefield Grade} "" "{IF {Mergefield Grade "0" "{Mergefield
Grade}" ""}" ""}

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Lyn wrote:
Thankyou for your help so far.

In my Excel data file, the data consists of grades (A+ to E-) or a
blank/zero if the test has not been completed. In other words, my
data is not always numeric. Will that formatting switch work with
the non-numeric data?

Add the following formatting switch to the mergefield

\# ",#.00;(,#.00);"

That will give you numbers to two decimal places with a thousands
separator, with negative numbers in parentheses and a blank for a
zero.

Delete the .00 if you don't want the decimals places.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Lyn" wrote in message
...
I am attempting to merge data from Excel into a word document
(table). I have the zeros suppressed in Excel. However, after the
merge, the word document shows zeros when I would prefer blanks.
How do I suppress the zeros? If I have to use an IF statement in
the merge document, what is its
syntax?

PS This was not a problem in Word 2003.
--
Lyn



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
Mail Merge SP3 - Suppressing Blank Lines Rod Mailmerge 1 July 12th 07 09:03 PM
Keep getting zeros in my mail merge for zip code kartman2k Mailmerge 1 June 19th 06 06:17 PM
dropping leading zeros in mail merge Jim Mailmerge 3 June 17th 05 07:02 AM
Mail Merge Dropping leading zeros richard via OfficeKB.com Mailmerge 1 February 4th 05 10:58 PM
Trailing zeros cut off on mail merge from Excel alant Mailmerge 2 January 21st 05 01:45 AM


All times are GMT +1. The time now is 06:31 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"