Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to hide a merge field

300 views
Skip to first unread message

mdicke

unread,
May 15, 2009, 3:56:06 AM5/15/09
to
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.)

Graham Mayor

unread,
May 15, 2009, 6:23:29 AM5/15/09
to
You can use a formatting switch on a numeric field
eg
{Mergefield Fieldname \# "0.00";;)
This is covered on my web site at
http://www.gmayor.com/formatting_word_fields.htm

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

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

mdicke

unread,
May 15, 2009, 8:06:02 AM5/15/09
to
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

Graham Mayor

unread,
May 15, 2009, 9:31:40 AM5/15/09
to
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

mdicke

unread,
May 15, 2009, 1:45:01 PM5/15/09
to
PERFECT! Thank you!
0 new messages