Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Suppressing a Zero in a Calculated Sum.

Suppressing a Zero in a Calculated Sum

Written by Allen Wyatt (last updated August 5, 2022)
This tip applies to Word 97, 2000, 2002, and 2003


Word allows you to create tables and to do a limited amount of math based on the cells in the table. Primarily, Word allows you to sum different cells; for instance, you can sum all the values in a particular column. Exactly how you do this has been covered in different issues of WordTips.

When calculating a sum, if the values that make up that sum total zero, then Word will show a zero in the cell where the summation formula is placed. In some instances you may want Word to simply leave the cell blank if the sum is zero. There are two ways you can achieve this goal.

First, you can use the picture switch with the SUM field to get exactly the type of numeric display you want. There are three possible settings you can use with the picture field, the first for the display of positive numbers, the second for the display of negative numbers, and the third if the number is zero. The following use of the SUM field illustrates this concept:

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

This is, of course, a field code, so the outermost brackets are created by pressing Ctrl+F9. The \# switch indicates that everything following and enclosed with quote marks constitutes the formats to be used in displaying the field results. The three settings within the quote marks are separated by semicolons. Thus, the first setting, #,##0.00, indicates that you want positive results displays using two decimal places and commas between thousands. The second setting, (#,##0.00), indicates the same treatment for negative numbers, except that the result is surrounded by parentheses. The third setting, which consists of two apostrophes with nothing between them, indicates that if the result is zero, you want nothing displayed.

The second possible solution is to use a nested field for calculating the sum. In this case, you would use the IF field to determine if the sum was zero. If it is, then you display the sum, if not, then you display nothing. The following is the example:

{ IF { =SUM(ABOVE) } = 0 "" { =SUM(ABOVE) } }

When this nested field is calculated, Word first checks to see if the sum of the above cells is zero. If it is, then the contents of what is between the quote marks (nothing) is displayed. If it is not, then the actual sum is displayed.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1643) 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: Suppressing a Zero in a Calculated Sum.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Organizing AutoText Entries

Want to get more organized with your AutoText entries? Here's how you can take advantage of the organizational features ...

Discover More

Using Named Ranges in a Macro

Named ranges are a great capability provided by Excel. You can define all sorts of named ranges in a workbook, but how do ...

Discover More

Excel 2013 PivotTables for the Faint of Heart (Table of Contents)

PivotTables are a powerful tool for consolidating huge amounts of data. PivotTables 2013 for the Faint of Heart ...

Discover More

Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!

More WordTips (menu)

Hiding Table Gridlines, by Default

The edges to table cells are shown two ways in Word: gridlines and borders. Table gridlines are only seen in Word; they ...

Discover More

Erroneous Table Math

Depending on the type of data you have in your table, the SUM(ABOVE) function might return incorrect results. Here's an ...

Discover More

Picking a Contiguous Range of Table Cells

Creating a table in Word is a relatively simple task. When you want to format or edit information in the table, often the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 8?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

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.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.