Active Cell May Change When You Sort a PivotTable (178047)
The information in this article applies to:
- Microsoft Excel 97 for Windows
- Microsoft Excel 98 Macintosh Edition
This article was previously published under Q178047 SYMPTOMS
In Microsoft Excel 97 and Microsoft Excel 98 Macintosh Edition, when you
sort a PivotTable, the active cell may change, depending on the structure
of the PivotTable.
This behavior may cause a problem if you sort the PivotTable while running
a Visual Basic for Application procedure that assumes that the active cell
has not changed as a result of the sort.
NOTE: This behavior is different from earlier versions of Microsoft Excel.
To see an example of this behavior, see the "More Information" section in
this article.
CAUSE
This problem occurs because Microsoft Excel 97 and Microsoft Excel 98
Macintosh Edition use "structured selection" in PivotTables. This means
that when you sort a PivotTable, Microsoft Excel moves the selection with
the currently selected data. If the selection is not adjacent (not
contiguous), Microsoft Excel selects the upper-right cell in the current
selection.
This behavior is by design of Microsoft Excel.
WORKAROUND
You cannot change this behavior. However, if you are using a Visual Basic
procedure to sort a PivotTable, try modifying the macro so that it does
not assume that the active cell remains unchanged when you sort the
PivotTable.
Modification Type: | Minor | Last Reviewed: | 8/19/2003 |
---|
Keywords: | kbprb KB178047 |
---|
|