How to hide a merge field

M

mdicke

I would like to hide a field in a merge, but only if it's =0 in my Excel
spreadsheet. Otherwise, I would like the filed to show up as it normally
would. An IF statement with " " (quotes around a blank) doesn't seem to be
cutting it. Any suggestions? (Couldn't find anything on a couple of the MVP
sites referenced throughout this board.)
 
M

mdicke

Your suggestion of {Mergefield Fieldname \# "0.00";;} didn't work. And I
didn't see anything on your site that really showed what I was looking for.

Here's my field as it currently stands, and works returning me the correct
data:

{ MERGEFIELD O_08 \# $##.00 }

What I'd like to do (or think I need to do) is something like this:

{ IF { MERGEFIELD O_08 = 0 "" { MERGEFIELD O_08 \# $##.00 } }

or mabye just:

{ IF { MERGEFIELD O_08 = 0 "" \# $##.00 }

Whatever the case, I can't get the filed blank if there's a zero in that cell.

Thanks.
Matt
 
G

Graham Mayor

OK

{ IF { MERGEFIELD O_08 } <> 0 { MERGEFIELD O_08 \# "$,0.00"} }

If you want zeros suppressing also, add in the semi-colons to the switch
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


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

mdicke

PERFECT! Thank you!

Graham Mayor said:
OK

{ IF { MERGEFIELD O_08 } <> 0 { MERGEFIELD O_08 \# "$,0.00"} }

If you want zeros suppressing also, add in the semi-colons to the switch
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
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