Empty cell in Excel results in a "0"

A

Alex Leibovici

Office XP SP3
Windows 2000 SP4

When doing a merge from an Excel sheet, empty cells generate a "0" in
the merge, instead of remaining empty. Tried to define the cells as
text (instead of "General" or "Number") - same result.

Doesn't happen on a machine with Office XP SP2 and Windows 2000 SP3,
where the merge fields remain empty !!!

Any ideas where I should look ?

TIA

Alax
 
M

macropod

Hi Alex,

If the mergefield is numeric, you could control this by adding a numeric
picture switch to the field. For example,
\# $,0.00;($,0.00);
so that your field looks something like:
{MERGEFIELD ExcelData \# $,0.00;($,0.00);}
The string after the first semicolon tells the field how to format negative
values and the string after the last semicolon tells the field how to format
0s. In this case, there's nothing after the last semi-colon, so that tells
Word not to display 0s.

Alternatively, if you're merging text, you could control the output via an
IF test. For example:
{IF{MERGEFIELD ExcelData}= 0 "" {MERGEFIELD ExcelData}}

For more information, see:
http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=365442
(url all one line)

Cheers
 
C

Cindy M -WordMVP-

Hi Alex,
Office XP SP3
Windows 2000 SP4

When doing a merge from an Excel sheet, empty cells generate a "0" in
the merge, instead of remaining empty. Tried to define the cells as
text (instead of "General" or "Number") - same result.
See my reply from today in this message thread: Merging from Access

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

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