WD: Table Formula SUM(Above) Adds Number from Heading Row

Last reviewed: February 4, 1998
Article ID: Q105639
The information in this article applies to:
  • Microsoft Word for Windows, version 6.0, 6.0a, 6.0c
  • Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word 97 for Windows
  • Microsoft Word 98 Macintosh Edition

SYMPTOMS

In Word 6.x-7.x, if a table row marked as Headings has a cell that contains a number with no other text characters, the formula SUM(Above) incorrectly includes the value from the heading row cell into the calculation.

In Word 97 for Windows and Word 98 Macintosh Edition, the formula SUM(Above) incorrectly includes the value from the heading row into the calculation even if the cell in the Heading row of the table contains text and a number.

This happens only on the first page of the table.

CAUSE

When Word searches for the contiguous cells, it starts at the formula cell and continues up until it finds the first cell containing a number. It stops when it encounters the first blank cell or cell containing a number and/or text characters above the last cell that contains a number only.

MORE INFORMATION

The following are some examples where the formula results are incorrect and others where the results are correct.

Sample Table with Formulas

   ---------------------------------------------------------
   |      1      |     Two     |    No. 3    |      4      |
   ---------------------------------------------------------
   |      2      |      2      |      2      |             |
   ---------------------------------------------------------
   |      3      |      3      |   row 3     |      3      |
   ---------------------------------------------------------
   |{=SUM(Above)}|{=SUM(Above)}|{=SUM(Above)}|{=SUM(Above)}|
   ---------------------------------------------------------

Sample Table with Results

   ---------------------------------------------------------
   |      1      |     Two     |    No. 3    |      4      |
   ---------------------------------------------------------
   |      2      |      2      |      2      |             |
   ---------------------------------------------------------
   |      3      |      3      |  row  3     |      3      |
   ---------------------------------------------------------
   |      6      |      5      |      5      |      3      |
   ---------------------------------------------------------

NOTE: Word 97 for Windows and Word 98 Macintosh Edition returns 8 in Row4 Column3.

Row 1 of the Sample Table was marked as Headings (select the row and click Headings on the Table menu).

Result of Row4 Column1:

  • The result of the formula includes the numeric value of the heading for that column.

Result of Row4 Column2:
  • The result of the formula includes the set of contiguous cells that contain numeric values.

Result of Row4 Column3:
  • The result of the formula does not include the heading for that column because it also contains text characters. But the value of Row3 Column3 is included in the results because there is a numeric value in that cell. Cells containing numeric values along with text are only included with the formula results Word encounters them before the first cell containing only numbers (remembering Word calculates from the formula upwards). Word 97 for Windows and Word 98 Macintosh Edition returns 8 because it includes the value 3 from Row1 Column 3.

Result of Row4 Column4:
  • The result of the formula does not include the heading for that column because there is a blank cell above the last cell containing only numbers.

The behavior described above for columns also applies to summing rows using Table/Formula. The Formula will read SUM(Left) if placed in a row with cells containing numbers to the left of the target cell, and no numbers above the target cell in the same column.

If there are numbers in the column above the target cell, as well as to the left, the default formula in the dialog box will read SUM(Above). This may be edited to read SUM(Left) to sum the row instead. Note that if there is a cell above the target cell that contains only text, below other cells containing numbers, SUM(Left) is offered as the default.

The formulas SUM(Below) and SUM(Right) are also valid in the appropriate cell context, but are never offered as a default. If there are no cells containing numbers to the left or above the target cell the default offered is only '='. You may add the SUM formula you want to the dialog box field.


Additional query words: sum total calculate 8.0 8.00
Keywords : kbtable macword winword word6 word8 word95 word97 kbualink97
Version : WINDOWS:6.0,6.0a,6.0c,7.0,7.0a,97;MACINTOSH:6.0,6.0.1,6.0.1a,98
Platform : MACINTOSH WINDOWS
Issue type : kbbug


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 4, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.