Knowledge Base

XL97: Error When Sorting a Range Containing Merged Cells

PSS ID Number: 157111

Article Last Modified on 8/27/2002


The information in this article applies to:


This article was previously published under Q157111
For a Microsoft Excel 2002 version of this article, see 291063.
For a Microsoft Excel 2001 or Microsoft Excel 98 version of this article, see 178966.
For a Microsoft Excel 2000 version of this article, see 212008.

SYMPTOMS

When you attempt to sort a range on a worksheet, you may receive the following message
This operation requires the merged cells to be identically sized.
and Microsoft Excel does not sort the range.

CAUSE

This behavior may occur when you sort a range of cells when the following conditions are true:

WORKAROUND

To work around this behavior, either unmerge all the merged cells in the range, or merge all the cells in the range such that the merged cells are the same size. Each merged cell in the range must occupy the same number of rows and columns as the other merged cells in the range.

MORE INFORMATION

For more information about merging and unmerging cells, click the Office Assistant, type merging cells, click Search, and then click to view "Merge cells to span several columns or rows" or "Split a merged cell into separate cells."

NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Microsoft Help is not installed on your computer, click the article number below to view the article in the Microsoft Knowledge Base:

120802 Office: How to Add/Remove a Single Office Program or Component

The following example demonstrates the problem:
  1. In a worksheet, type the following:
       A1:     B1  Name      C1: Value
       A2:     B2  Sue       C2: 1
       A3:     B3  Tom       C3: 2
    					
  2. Merge cells A1 and B1, A2 and B2, and A3 and B3. To do this, select each pair of cells, click Cells on the Format menu, click the Alignment tab, click Merge cells, and click OK.

    Do not merge cells in column C.
  3. Select cells A1:C3, click Sort on the Data menu, and click OK.

Additional query words: XL97 8.0 8.00

Keywords: kberrmsg KB157111
Technology: kbExcel97Search kbExcelSearch kbExcelWinSearch kbZNotKeyword3