Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Suppressing zeros in a mail merge document
I am attempting to merge data from Excel into a word document (table). I
have the zeros suppressed in Excel. However, after the merge, the word document shows zeros when I would prefer blanks. How do I suppress the zeros? If I have to use an IF statement in the merge document, what is its syntax? PS This was not a problem in Word 2003. -- Lyn |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Suppressing zeros in a mail merge document
Add the following formatting switch to the mergefield
\# ",#.00;(,#.00);" That will give you numbers to two decimal places with a thousands separator, with negative numbers in parentheses and a blank for a zero. Delete the .00 if you don't want the decimals places. -- 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 "Lyn" wrote in message ... I am attempting to merge data from Excel into a word document (table). I have the zeros suppressed in Excel. However, after the merge, the word document shows zeros when I would prefer blanks. How do I suppress the zeros? If I have to use an IF statement in the merge document, what is its syntax? PS This was not a problem in Word 2003. -- Lyn |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Suppressing zeros in a mail merge document
Thankyou for your help so far.
In my Excel data file, the data consists of grades (A+ to E-) or a blank/zero if the test has not been completed. In other words, my data is not always numeric. Will that formatting switch work with the non-numeric data? -- Lyn "Doug Robbins - Word MVP" wrote: Add the following formatting switch to the mergefield \# ",#.00;(,#.00);" That will give you numbers to two decimal places with a thousands separator, with negative numbers in parentheses and a blank for a zero. Delete the .00 if you don't want the decimals places. -- 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 "Lyn" wrote in message ... I am attempting to merge data from Excel into a word document (table). I have the zeros suppressed in Excel. However, after the merge, the word document shows zeros when I would prefer blanks. How do I suppress the zeros? If I have to use an IF statement in the merge document, what is its syntax? PS This was not a problem in Word 2003. -- Lyn |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Suppressing zeros in a mail merge document
No, it will only work with numeric data. You need a conditional field.
Assuming a fieldname 'Grade' {IF {Mergefield Grade} "" "{IF {Mergefield Grade "0" "{Mergefield Grade}" ""}" ""} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Lyn wrote: Thankyou for your help so far. In my Excel data file, the data consists of grades (A+ to E-) or a blank/zero if the test has not been completed. In other words, my data is not always numeric. Will that formatting switch work with the non-numeric data? Add the following formatting switch to the mergefield \# ",#.00;(,#.00);" That will give you numbers to two decimal places with a thousands separator, with negative numbers in parentheses and a blank for a zero. Delete the .00 if you don't want the decimals places. -- 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 "Lyn" wrote in message ... I am attempting to merge data from Excel into a word document (table). I have the zeros suppressed in Excel. However, after the merge, the word document shows zeros when I would prefer blanks. How do I suppress the zeros? If I have to use an IF statement in the merge document, what is its syntax? PS This was not a problem in Word 2003. -- Lyn |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mail Merge SP3 - Suppressing Blank Lines | Mailmerge | |||
Keep getting zeros in my mail merge for zip code | Mailmerge | |||
dropping leading zeros in mail merge | Mailmerge | |||
Mail Merge Dropping leading zeros | Mailmerge | |||
Trailing zeros cut off on mail merge from Excel | Mailmerge |