Microsoft KB Archive/119130

= Microsoft Knowledge Base =

XL: Cell Borders Not Sorted with Data
Last reviewed: March 27, 1997

Article ID: Q119130

5.00 5.00c 7.00 | 5.00 5.00a

WINDOWS        | MACINTOSH kbusage

The information in this article applies to:


 * Microsoft Excel for Windows, versions 5.0, 5.0c
 * Microsoft Excel for the Macintosh, versions 5.0, 5.0a
 * Microsoft Excel for Windows NT, version 5.0
 * Microsoft Excel for Windows 95, version 7.0

SYMPTOMS
In Microsoft Excel 5.0, the border formatting of a cell is anchored to that cell and does not move when you sort a range of cells.

NOTE: This behavior is different from Microsoft Excel 4.0. In Microsoft Excel 4.0, the border around a cell is anchored to the cell's contents (that is, when the data is sorted, the border format moves with the cell's contents).

All other cell formatting, including patterns and locked and hidden attributes, moves with the value when you sort data in Microsoft Excel 5.0.

WORKAROUND
If you want to create a border-like format that is anchored to the data, use the drawing tools, and create a line or rectangle around the data. Then, make sure that the "Cut, Copy, And Sort Objects With Cells" option is selected on the Edit tab of the Options dialog box (from the Tools menu, choose Options). When you sort the cells that are outlined with the lines or rectangles, the objects will be moved with the data in the cells.

STATUS
This behavior is by design in Microsoft Excel version 5.0. Cell borders are often used to delimit portions of the worksheet. And therefore, in order to maintain the desired spreadsheet format, borders are not moved with the sorted cells.