WD: Wrong Calculation Result with Bookmarks in Table

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

SYMPTOMS

A formula in Word may show an incorrect result if the calculation refers to a bookmark in a table when the bookmark includes the entire cell.

For example, the following table has two cells, with a bookmark applied to the first cell:

           --------------------
          |    4     |    6    |
           --------------------
          ^--test1---^

The next paragraph contains a field that multiplies the bookmark:

          {=test1*3 }

The result of the field is 30, but it should be 12.

CAUSE

When the bookmark includes the cell's boundary, it also includes information about the number of columns, which is then included in the calculation.

WORKAROUND

To work around this problem, use either of the following methods.

Method 1

Apply the bookmark only to the contents of a cell, not to the entire cell. This method is best when you expect that the contents of the cells won't change, or if you only reference one cell from the table.

Method 2

Use the following procedure to refer to the individual cells by applying a bookmark anywhere in the table. This method is most efficient when you need to use several cells from the table.

  1. Place the insertion point somewhere in the table where a bookmark is unlikely to ever be deleted.

  2. From the Edit menu, choose Bookmark.

  3. Type a name for the bookmark, such as "Table1" (without the quotation marks).

  4. Move the insertion point to the place where you want the formula.

  5. Type the reference to the cell in the following format:

              sum(tablebookmarkname[cellreference])
    
       In the above example, the formula would look like this:
    
              {=sum(Table1[A1])*3}
    
    
To add two cells from the same table, apply the bookmark only once, as in steps b and c, and use a formula such as the following:

          {=sum(Table1[A1])+sum(Table1[B1])}


Additional query words:
Keywords : kbtable macword winword word6 word7 word95 word97 kbualink97
Version : WINDOWS:6.0,6.0a,6.0c,7.0,7.0a,97;MACINTOSH6.0,6.0.1,6.0.1a,98
Platform : MACINTOSH WINDOWS
Issue type : kbprb
Solution Type : kbworkaround


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 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.