You may receive an error message when you sort a range that contains merged cells in Excel
- You previously merged some cells, but not all cells in the sort range.
- You previously merged all cells in the sort range and the cells are not all the same size.
Steps to reproduce the problem
- In a worksheet, type the following data:
A1: B1: Name C1: Value A2: B2: Sue C2: 1 A3: B3: Tom C3: 2
- Merge cells A1 and B1, A2 and B2, and A3 and B3. To do this, follow these steps:
- Select each pair of cells.
- On the Format menu, click Cells.
Note In Microsoft Office Excel 2007, click the Alignment dialog box launcher in the Alignment group on the Home tab.
- Click the Alignment tab, and then click to select the Merge cells check box.
- Click OK.
Do not merge cells in column C.
- Select cells A1:C3, click Sort on the Data menu, and then click OK.
Note In Excel 2007, click Sort & Filter in the Editing group on the Home tab, and then click Custom Sort.
- In the Sort box, click OK.
Article ID: 813974 - Last Review: 01/30/2007 22:21:12 - Revision: 7.2
- kbexpertisebeginner kbfaq kberrmsg kbprb KB813974