No. In Excel, the cells you merge do not need to have identical widths or heights; they need to form one continuous rectangular range. The resulting merged area uses the combined width of its columns and the combined height of its rows, although merged cells can cause problems with sorting, filtering, and automatic sizing.
What Excel Means by a Merged Cell
Excel cells do not each have independent dimensions. A column has a width shared by its cells, and a row has a height shared across that row. When you select a rectangular group of neighboring cells and merge them, Excel treats that group as one larger cell for display and editing. The original columns and rows remain in place, with their existing widths and heights.
For example, suppose columns A and B are different widths. If you select A1:B1 and merge them, the merged area spans both columns, so its total width is the width of A plus the width of B. The columns do not have to match. Likewise, merging A1:A2 uses the combined height of rows 1 and 2, even if those rows have different heights.
There is one important distinction: Excel requires the selected cells to make a continuous rectangle. You cannot merge a scattered selection such as A1 and C1 while leaving B1 out, or select separate areas that do not form one rectangular range. This is a shape requirement, not a requirement that the component rows or columns be equal in size.
How to Merge Cells in Excel for Microsoft 365
In Excel for Microsoft 365 on Windows, select the adjacent rectangular range, then choose Home > Merge & Center. The main button merges the selection and centers its content. Use the dropdown arrow beside it to choose a different merge behavior. On current Excel for Mac versions, the merge controls are also on the Home tab; the exact layout may vary slightly with the ribbon arrangement.
If the selected range contains data in more than one cell, Excel displays a warning that merging keeps only the upper-left cell’s content and discards the contents of the other cells. Check the selection before confirming. The warning concerns cell contents, not dimensions. Merging does not combine several values into one string or preserve them as separate hidden entries.
To undo the merged layout later, select the merged area and choose Home > Merge & Center > Unmerge Cells. Unmerging restores the underlying cells and their grid boundaries. It does not restore any values that were discarded during the original merge; the value that remains is in the upper-left cell.
What Happens to Different Row Heights and Column Widths
Unequal dimensions affect the size and appearance of the merged area, but they do not prevent merging. A merged range across columns spans their combined widths. A range across rows spans their combined heights. This can make a merged heading look wider or taller than expected, especially if the worksheet has narrow columns, unusually tall rows, or hidden rows and columns.
Because row height and column width apply to entire rows or columns, resizing part of a merged area can affect cells outside that area. If a title spans columns A through D, widening column B also widens every other cell in column B. Excel does not offer a separate width control for just the merged title. This is why some people describe merged cells as needing to be the same size: consistent dimensions can make a layout easier to control, but they are not a condition for merging.
Keep in mind that merging does not change the dimensions of the component rows or columns to make them uniform. It simply presents the selected rectangle as a single cell area. If the final area looks off-center or too large, adjust the relevant row heights or column widths, keeping in mind that those adjustments affect the worksheet grid beyond the merged cell.
Merge Options and What Each One Does
The Merge & Center dropdown offers several choices. Their behavior differs, so choose based on the layout rather than assuming every option works the same way:
- Merge & Center: Combines the selected range into one merged area and centers the remaining content horizontally.
- Merge Across: Merges cells across each row of the selected range separately. Selecting A1:C3, for example, creates one merged area in row 1, another in row 2, and another in row 3. It does not make all nine cells into one area.
- Merge Cells: Combines the selection into one merged area without applying the horizontal centering used by Merge & Center.
- Unmerge Cells: Separates a merged area back into its component cells.
The vertical alignment and other formatting can still be adjusted through the alignment controls on the Home tab. A merged area may need Wrap Text or a manually adjusted row height if its label is long. Merging itself is not a text-wrapping feature and does not guarantee that all content will be visible.
Why Excel Sometimes Says Merged Cells Must Be Identically Sized
The phrase in the question often comes from an error encountered while sorting, rather than while merging. Excel may reject a sort when the range contains merged cells that do not have matching shapes and dimensions. For example, a worksheet with one heading merged across A1:B1 and another merged across A2:C2 may be visually acceptable, but sorting a range that includes both can trigger a message that merged cells must be identically sized.
That restriction applies to the operation Excel is trying to perform. It does not mean every merged area anywhere on the sheet must match, and it does not mean unequal-width columns cannot be merged. A rectangular merged range can be created across columns of different widths. The problem is that sorting rearranges records, and irregular merged areas make it unclear how cells should move while preserving their merged structure.
Other worksheet tasks can also be awkward when ranges contain merged cells. Selecting a consistent data range, filtering records, pasting into a partly merged selection, or inserting and moving cells may be restricted or produce unexpected layouts. The precise result depends on the operation and selection, but merged cells are generally a poor fit for the body of a table that needs regular row-by-row operations.
Formatting, AutoFit, and Display Problems
Merged cells can complicate automatic sizing. Excel’s AutoFit commands are designed around ordinary cell contents and row or column dimensions; they do not reliably calculate the ideal row height for text in a merged area. A long heading may appear clipped even when Wrap Text is enabled. You may need to set the row height manually, shorten the label, or change the layout instead of relying on AutoFit.
A merged area also makes selection and navigation less straightforward. Clicking any part of it selects the merged area, and keyboard movement may jump past component cells that are not independently selectable while merged. If the worksheet is used by other people, a large merged area can obscure the underlying grid and make it harder to tell where data entry is expected.
For a printout or a presentation-style report, those trade-offs may be acceptable. For a working sheet, test the result after changing zoom, printing, or adjusting nearby columns. A layout that looks balanced on screen can wrap or clip differently when printed, especially if page scaling changes the effective width.
When to Merge and When to Use an Alternative
Merging can be useful for a report title spanning several columns or for a form label that genuinely needs to occupy a larger rectangular area. It is less suitable for ordinary data records, where each row should have the same fields and each cell should remain independently addressable. Avoid merging cells inside a list you expect to sort, filter, convert to a table, or analyze with PivotTables.
For a heading that only needs to look centered across columns, use Center Across Selection instead of merging. Select the cells, open the Format Cells dialog with Ctrl+1 on Windows, choose the Alignment tab, and set Horizontal to Center Across Selection. The cells remain separate, which usually makes sorting and selection easier than a merged cell. On Mac, use Command+1 to open Format Cells; the dialog includes the corresponding alignment setting.
Another alternative is to put a heading in one cell and use alignment, indentation, or column sizing to position it. For structured data, keep one value per cell and use formatting such as borders, fill color, and bold text to create visual groupings without merging. These choices preserve the rectangular structure Excel’s data tools expect.
A Practical Checklist Before You Merge
Before applying a merge, consider what the worksheet needs to do later. This brief check helps avoid rebuilding a layout after data has been entered:
- Confirm the selection is one continuous rectangle and that its upper-left cell contains the value you want to keep.
- Check every other selected cell for content, since Excel will discard those values when the range is merged.
- Decide whether the range is a decorative heading or part of data that must be sorted, filtered, or analyzed.
- Check how the combined row heights and column widths will look, including the effect of any later resizing.
- Consider Center Across Selection or ordinary formatting if you only want a centered appearance.
If you already have a merged range that blocks a sort, unmerge the relevant cells first and reorganize the data into a consistent grid. If the merged cells are only headings, move those headings outside the data range where possible. Avoid trying to force a sort by selecting only part of a merged area, since that can create a different alignment problem rather than fixing the underlying structure.
Frequently Asked Questions
Can I merge cells with different column widths?
Yes. The merged area spans the combined widths of the selected columns. The columns do not need to have equal widths, though changing one column affects other cells in that column too.
Can I merge cells with different row heights?
Yes. The merged area spans the selected rows and uses their combined height. Excel does not make the individual row heights equal as part of the merge.
Why does Excel say merged cells must be identically sized?
This commonly appears when you try to sort a range containing merged areas with different shapes or dimensions. It is a restriction of that sorting operation, not a general rule that all cells must match before you can merge them.
Does merging preserve the contents of every selected cell?
No. When several selected cells contain content, Excel keeps the upper-left cell’s entry and warns that the other contents will be removed. Copy or combine important values before merging.
What is safer than merging a heading?
Center Across Selection keeps the cells separate while visually centering the heading across the selected range. It is often a better option when you may later sort, filter, or edit the worksheet’s structure.
Related
- Excel Data Validation Dynamic List: Setup and Tips
- Excel Data Validation Dependent Drop-Downs: Setup Guide
- Excel Data Validation Custom Lists: Setup and Tips
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Making Labels in Microsoft Word: A Practical GuideTo make labels in Microsoft Word, open Mailings > Labels, enter the label text, choose the label maker…
- Excel Row Height Limit: The 409-Point MaximumThe maximum row height in Excel for Microsoft 365 on Windows is 409 points. To set a row’s…
- Google Sheets Custom Data Validation: Rules and TipsTo create custom data validation in Google Sheets, select the cells, choose Data > Data validation, click Add…
- Excel Split Cell Color in Half: What WorksExcel cannot give one cell two separate solid fill colors, but you can create the appearance of a…
- How to Merge Cells in Excel: Steps and Safe OptionsTo merge cells in Excel for Microsoft 365 on Windows, select a rectangular range, then choose Home >…
- How to Insert and Use Checkboxes in Word for the WebTo add an interactive checkbox list in Word for the web, open the Home tab, choose Checklist in…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.