Workaround for sorting and filtering of merged cells

Excel 365 2013
In some situation you can't work with workbook that consists of merged cells. To use Filter, Sort or other functions, you need to unmerge cells and put to all of them the data from merged cells. This tip shows how to do it efficiently.

First step: Unmerging all merged cells

   1.   Select all cells in the worksheet.

A quick way to do so is to click the triangle at the intersection of the row headers and column headers:

Select all cells in Excel 2010

   2.   On the Home tab, in the Alignment group, click Merge & Center:

Merge and Center in Excel 2010

When you click this button, all selected cells in the worksheet will be merged.

NOTE: If Merge & Center button isn't highlighted, there are no merged cells.

Second step: Filling the Gaps in a Sheet

   3.   Select the range that has the gaps.

   4.   On the Home tab, in the Editing group, choose the Find & Select drop-down list and then click Go To Special...:

Go To Special in Excel 2010

   5.   In the Go To Special dialog box, select the Blanks option and click OK:

Blanks in Excel 2010

This action selects the blank cells in the original selection.

   6.   On the Formula bar, type an equal sign (=) followed by the address of the first cell with an entry in the column (=B7, in this example) and press Ctrl+Enter:

Formula bar in Excel 2010

   7.   Reselect the original range and press Ctrl+C to copy the selection.

   8.   On the Home tab, in the Clipboard group, choose the Paste drop-down list and then click Paste Values to convert the formulas to values:

Clipboard group in Excel 2010

After you complete these steps, the gaps are filled in with the correct information. Now it's a normal list, and you can do whatever you like with it - including sorting, filtering, etc.

If you have any questions or suggestions, please feel free to ask OfficeToolTips team.

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information you’ve provided to them or they’ve collected from your use of their services.

Learn more