Suppressing zeros in a mail merge document

L

Lyn

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

Doug Robbins - Word MVP

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
 
L

Lyn

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?
 
G

Graham Mayor

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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