Written by Allen Wyatt (last updated March 30, 2019)
This tip applies to Word 97, 2000, 2002, and 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 field switch. It tells Word that the following codes 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.
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (543) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Displaying Blanks when Summing to Zero.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
When you create a list using the SEQ field, you may want to create a cross-reference to an item in that field. You can do ...
Discover MoreFields are used for all sorts of purposes in Word, but typically to provide some sort of dynamic information. This tip ...
Discover MoreWhen you use fields to number items within a document, you may want to add some standard text before each field. There ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2019-06-20 03:42:20
Jeff
Hi what happens if I want to replace 0 with a dash "-"
Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments