WD2000: Formula Field Won't Update Correctly with Nested Table

ID: Q224733


The information in this article applies to:


SYMPTOMS

When you try to do a calculation with a number in a nested table, Word displays one of the following problems:

Case 1

The result of the FORMULA field is incorrect. For example, the SUM field in the following example

   +------------+------------+
   |      2     |      2     |
   +------------+------------+
   |            |  +------+  |
   |      2     |  |   2  |  |
   |            |  +------+  |
   +------------+------------+
   |{Sum(Above)}|{Sum(Above)}|
   +------------+------------+ 
displays the following incorrect result.

   +------------+------------+
   |      2     |      2     |
   +------------+------------+
   |            |  +------+  |
   |      2     |  |   2  |  |
   |            |  +------+  |
   +------------+------------+
   |      4     |      2     |
   +------------+------------+ 

Case 2

The following error message appears when you try to do a calculation using a bookmark name for a nested table.
<bookmarkname> Is Not In Table
For example, if you bookmark the large outside table as Table1 and the nested table as Table2 and use the FORMULA field ( {=sum(Table1 b1)+sum(Table2 a1)} ) to calculate the result of column B in the following table

   +--------------------------------+--------------------------------+
   |                2               |                2               |
   +--------------------------------+--------------------------------+
   |                                |        +--------------+        |
   |                2               |        |       2      |        |
   |                                |        +--------------+        |
   +--------------------------------+--------------------------------+
   |          {Sum(Above)}          |{=Sum(Table1 B1)+Sum(Table2 A1)}|
   +--------------------------------+--------------------------------+ 
the result displays the error message as in the following table.

   +--------------------------------+--------------------------------+
   |                2               |                2               |
   +--------------------------------+--------------------------------+
   |                                |        +--------------+        |
   |                2               |        |       2      |        |
   |                                |        +--------------+        |
   +--------------------------------+--------------------------------+
   |                4               |     !Table2 Is Not In Table    |
   +--------------------------------+--------------------------------+ 


CAUSE

A formula field does not recognize a nested table or a bookmark within a nested table. This functionality is by design.


WORKAROUND

To work around this problem, bookmark just the number in the nested table that is to be included in the calculation; for example, bookmark the text as B2. Do not bookmark the cell or the table. Then use an REF field to reference the number in your calculation, similar to the following example.


   +--------------------------------+--------------------------------+
   |                2               |                2               |
   +--------------------------------+--------------------------------+
   |                                |        +--------------+        |
   |                2               |        |       2      |        |
   |                                |        +--------------+        |
   +--------------------------------+--------------------------------+
   |          {Sum(Above)}          |     {={=Sum(B1)}+{Ref B2}}     |
   +--------------------------------+--------------------------------+ 
After you update the fields in your table, the result appears correctly.

   +--------------------------------+--------------------------------+
   |                2               |                2               |
   +--------------------------------+--------------------------------+
   |                                |        +--------------+        |
   |                2               |        |       2      |        |
   |                                |        +--------------+        |
   +--------------------------------+--------------------------------+
   |                4               |                4               |
   +--------------------------------+--------------------------------+ 


MORE INFORMATION

For more information about calculating values in a table, click Microsoft Word Help on the Help menu, type "How do I do calculations in a table?" in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

Additional query words:


Keywords          : kbdta wd2000 
Version           : WINDOWS:2000
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: May 24, 1999