Mailmerge with Excel as a database... Suppressing zero's in fields

M

Michael

Hello,
Could someone help me with this? I am using an excel database to populate a
form in Word. It is calculating dollar values and bringing them into Word.
I can't seem to suppress the zero's in fields that should be blank because
there is no value. I have been to G Mayor's site and tried what is there but
it does not seem to work. Any suggestion's???

Thanks in advance,
Mike
 
D

Doug Robbins

What formatting switch are you using?

To show positive and negative amounts but nothing for zero amounts, use:

\# "$,0.00;-$,0.00;"

or

\# "$,0.00;($,0.00);"

To just show the positive amounts, use:

\# "$,0.00;;"



--
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
 
M

Michael

Thanks for your input Doug. I tried earlier what you had suggested, but
somehow I could not get it to work. What I eventually used (and works well)
was this:
{if {mergefield fieldname} <> 0 "{mergefield fieldname}" }

Thanks again!
Mike
 
G

Graham Mayor

Did you update the field after adding the switch?

{Mergefield Amount \# ",$0.00;(,$0.00);" }
should work. How did you enter it?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

Michael

Hi Graham,
Looking at your switch, I do believe that I didn't use the first comma. I
am fairly new to this. I did although update the field. I am sure if I would
have input the comma I would have had better results :)

Mike
 
G

Graham Mayor

The first comma is the thousands separator. It will work in countries that
use a comma as such.

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