How to sort merged cells in Microsoft Excel

Sorting in Excel refers to the process of organizing the data in a selected range or table into a specific order based on one or more criteria. Sorting is a powerful tool that allows you to quickly analyze and identify patterns or trends within large datasets.

In this tutorial, we will learn how to sort merged cells in Microsoft Excel. To sort merged cells properly in Excel, you need to first unmerge the cells in the range you want to sort. Then sort the data based on your desired criteria, and finally re-merge the cells if necessary. This will ensure that the data remains consistent and in the correct order after sorting.

Method 1:  Sorting Merged Cells that are in a Single Column

Step 1 – Unmerge the Merged Cells

  • Unmerge the merged cells by clicking on the unmerge cell option in the Alignment section in the Home tab.

Step 2 – Enter the Value of the Merged Cell in the Unmerged Cell

  • Place an Equals sign in the blank cells and enter the reference of the preceding cell.
  • Press the Enter key.
  • Two or more cells with the same values will be generated from one merged cell.

Step 3 – Click on the Sort & Filter Option

  • Click on the Sort & Filter option in the Editing section.

Step 4 – Select a Criteria 

  • Select the required criteria, based on which you want to sort the cells.

Step 5 – Now Merge Back the Same Cells

  • Now merge the same cells.
  • This can be done by selecting the same cells and clicking on the merged cells option in the Alignment section.

Method 2: Sorting a Data Set With Merged Columns Based on Another Column

Step 1 – Unmerge the Merged Cells

  • Unmerge the merged cells by clicking on the unmerge cell option in the Alignment section in the Home tab.

Step 2 – Enter the Value of the Merged Cell in the Unmerged Cell

  • Place an Equals sign in the blank cells and enter the reference of the preceding cell with a value.
  • Press the Enter key.
  • Two or more cells with the same values will be generated from one merged cell.

Step 3 – Click on the Sort & Filter Option

  • Select the column on the basis of which you want to sort.
  • Click on the Sort & Filter option in the Editing section.

Step 4 – Select a Criteria 

  • Select the required criteria, based on which you want to sort the cells.

Step 5 – Now Merge Back the Same Cells

  • Now merge the same cells.
  • This can be done by selecting the same cells and clicking on the merged cells option in the Alignment section.