Fix “All the Merged Cells Need to Be the Same Size” in Excel

Written by

Mel Jenkins

Reviewed by

Laura Tsitlidze

Last updated on August 12, 2023

This tutorial demonstrates how to fix the error: “To do this, all the merged cells need to be the same size.”

fix merge intro

Fix Sort Error Due to Merged Cells

If your data contains some cells that are merged and others that are not, and you try to sort, you may encounter the error shown in the picture above.

  1. Select the merged cells, and then in the Ribbon, go to Home > Alignment > Merge & Center > Unmerge Cells.

fix merge ribbon unmerge

  1. This leaves the data from each merged cell in the top cell of each unmerged range.

fix merge unmerged

  1. Next, copy the data down from the top cell to the ones below.
    Tip: See how to fill blank cells with value above quickly using Go To Special.

fixmerge cells copied

  1. You are then able to sort by Region. If needed, re-merge the Region cells.

Fix Copy Error Due to Merged Cells

If you are copying a formula down to a range of cells, and some of the destination cells are merged, you could get the same error. Consider the following example.

Click on the cell that contains the formula to copy down, and then double-click in the bottom-right corner to copy the formula down to the cells below it.

fix merge copy formula down

If the range of cells that you are copying the formula to contain any merged cells, you will get the error: To do this, all the merged cells need to be the same size.

fix merge copy down

  1. To fix this problem, select all the cells in the fill range.

fix merge select merged cells

  1. In the Ribbon, go to Home > Alignment > Merge and Center > Unmerge Cells to unmerge all selected cells.

fix merge unmerge

  1. Now, copy the formula down to all rows. You won’t get the merged cells error.

fix merge copy formula down

AI Formula Generator

Try for Free

See all How-To Articles