WD: Incorrect Results in Formula Using ABOVE, BELOW, LEFT, RIGHT (111886)
The information in this article applies to:
- Microsoft Word for Windows 6.0
- Microsoft Word for Windows 6.0a
- Microsoft Word for Windows 6.0c
- Microsoft Word for Windows 95
- Microsoft Word for Windows 95 7.0a
This article was previously published under Q111886 SYMPTOMS
A formula field in a table yields an incorrect result when it includes
ABOVE, BELOW, LEFT, or RIGHT if the defined range contains noncontiguous
values (in other words, if there is one or more blank cell between two
values).
For example, the formula in cell A4 of the following table shows a result
of 4 instead of 7:
|------------------|
| 3 |
|------------------|
| |
|------------------|
| 4 |
|------------------|
| {=SUM(ABOVE)} |
|------------------|
CAUSE
Word calculates correctly up to the first empty table cell, then stops.
Word does not calculate any values beyond the first empty cell.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article.
WORKAROUND
To workaround this problem use one of the following methods.
Method 1: Type zero(0) in any blank cells
Type zero(0) in any blank cells included within the calculation range. For
example:
|------------------|
| 3 | <(Cell A1)
|------------------|
| 0 | <(Cell A2)
|------------------|
| 4 | <(Cell A3)
|------------------|
| 0 | <(Cell A4)
|------------------|
| 5 | <(Cell A5)
|------------------|
| {=SUM(ABOVE)} | <(Cell A6)
|------------------|
Method 2: Use cell references
For a range that contains one or more blank cells, use cell references to
define the range instead of ABOVE, BELOW, LEFT, or RIGHT. For example, use
the following formula field to obtain a correct result:
|------------------|
| 3 | <(Cell A1)
|------------------|
| | <(Cell A2)
|------------------|
| 4 | <(Cell A3)
|------------------|
| | <(Cell A4)
|------------------|
| 5 | <(Cell A5)
|------------------|
| {=SUM(A1:A5)} | <(Cell A6)
|------------------|
REFERENCES
"Microsoft Word User's Guide," version 6.0, pages 306-311
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | kbbug kbfield kbpending kbtable KB111886 |
---|
|