bottom
Great WordTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > WordTips Home > Fields > Displaying Blanks when Summing to Zero

Displaying Blanks when Summing to Zero

Summary: You can place totals in your tables, and you may want Word to suppress the display of zero sums. (This tip works with Microsoft Word 6, Word 95, Word 97, Word 2000, Word 2002, and Word 2003.)

When you are working with tables in Word, you can use a field to sum the values in a range of cells or in an entire column. Normally, if the sum of the range is zero, the field displays a 0--this seems reasonable. You may, however, want the field to display a blank when the sum is zero, instead of the actual number 0.

To do this, simply modify your sum formula as follows:

{ =SUM(ABOVE) \# #;-#; }

Notice the addition of several parameters after the SUM formula. The first (\#) is known as a numeric picture fields switch. It tells Word that the codes which follow represent a picture of how you want numeric information displayed. The second switch (just before the first semicolon) indicates how you want positive numbers to display. The second (just before the second semicolon) indicates how you want negative numbers to display. The final one (in this case blank, just after the second semicolon) indicates how you want zero values to display. Since this is blank, zero values are displayed as blanks.

You can apply the same logic if you want to display dollar values. Simply change the formatting codes used in the field to match how you want the data displayed:

{ =SUM(ABOVE) \# $#,##0.00;($#,##0.00); }

Here positive numbers are displayed with a dollar sign, commas (if necessary) and two decimal places. Negative values are displayed the same, except there are parentheses around the number. Again, zero values are left blank.

If you are using Word 6 or Word 95, then the process of adding a numeric picture switch is a little different. The switch is still the same, but you must enclose the entire picture after the switch within quote marks. Thus, the above field would be formatted as follows in Word 6 or Word 95:

{ =SUM(ABOVE) \# "$#,##0.00;($#,##0.00);" }

Tip #543 applies to Microsoft Word versions: 6 | 95 | 97 | 2000 | 2002 | 2003


Step Up and Take Control! Subscribers to WordTips know just how valuable a resource it is. WordTips Premium provides twice the number of exceptional, easy-to-understand tips every week in an ad-free newsletter, as well as substantial discounts on WordTips archives and e-books.
 
Check out WordTips Premium today!

Helpful Links

Ask a Word Question
Make a Comment

Tips.Net Home
Vital News Home

WordTips FAQ
WordTips Premium

Learn Access Now

Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips

Advertise on the
WordTips Site

 

Great Info!

Get tips like this every week in WordTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
     
(Your e-mail address will never be shared with anyone, ever.)