Workaround for sorting and filtering of merged cells
![Paste values to unmerged cells in Excel for Microsoft 365 Paste values to unmerged cells in Excel 365](/images/tips/314_365/1.png)
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 for Microsoft 365 Select all cells in Excel 365](/images/tips/329_365/1.png)
2. On the Home tab, in the Alignment group, click Merge & Center:
![Merge and Center in Excel for Microsoft 365 Merge and Center in Excel 365](/images/tips/excel_button365/unmerge.png)
When you click this button, all selected cells in the worksheet will be unmerged.
Note: If the Merge & Center button isn't highlighted, there are no merged cells in the selection.
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 for Microsoft 365 Go To Special in Excel 365](/images/tips/excel_button365/go_to_special.png)
5. In the Go To Special dialog box, select the Blanks option and click OK:
![Blanks in Excel for Microsoft 365 Blanks in Excel 365](/images/tips/314_365/2.png)
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. For this example, = B5:
![Formula bar in Excel for Microsoft 365 Formula bar in Excel 365](/images/tips/314_365/3.png)
7. Press Ctrl+Enter:
![Paste values to unmerged cells in Excel for Microsoft 365 Paste values to unmerged cells in Excel 365](/images/tips/314_365/4.png)
Third step: Remove the formulas
8. Reselect the original range and press Ctrl+C to copy the selection. In this example, cells B5:B12.
9. On the Home tab, in the Clipboard group, choose the Paste drop-down list and then click Values (V) to convert the formulas to values:
![Paste Values in Excel for Microsoft 365 Paste Values in Excel 365](/images/tips/excel_button365/paste_values.png)
After completing these steps, the gaps are filled in with the correct information. Now it's a regular list, and you can do whatever you like with it - including sorting, filtering, etc.
See also this tip in French: Comment trier et filtrer des cellules fusionnées.