Using IF to suppress blank or 0 field

K

Karen White

I've been trying, unsuccessfully, to use the IF statement
to suppress a blank field from an excel spreadsheet. It
keeps putting a 0 in. How exactly do I get this to ignore
the excel field if it is empty?

Really need some help - please

Karen
 
P

Peter Jamieson

Unfortunately, by the time the data reaches Word it already has "0" in it,
not "blank", so the only way to suppress it in Word would be to use

{ IF { MERGEFIELD myfield } = 0 "" "{ MERGEFIELD myfield }" }

and that can only work if a zero /always/ means "it's blank".

Otherwise, you will need to change the column formatting in Excel (e.g. to
text) and reconnect Word to Excel (and even that may not work), or change
the way Word connects to Excel - in Word 2002, check Word
Tools|Options|General|Confirm conversions at open, go through the connection
process again, and select the DDE method when prompted.
 

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