You can't merge a range in Excel until every cell inside the selection matches the one you started from. Excel merges by the formatting anchor, so a selection of A1 and B1 only works if both are the same size: same row height, same column width, and, in most merge dialogs, the same horizontal and vertical alignment. If one cell carries a taller row or a wider column than its neighbor, the Merge & Center button greys out, the dialog throws the classic "To do this, all the merged cells need to be the same size" message, and the sheet simply refuses. The fix is to even out the size, not to fight the merge button.
That message is the boundary. It appears whenever a merge target is disqualified, and it shows up in two very different situations: you're merging a fresh block of uneven cells, or Excel is telling you that an existing merge already lives inside the range you're trying to sort, filter, paste, or fill. Handle the sizing first and the merge becomes a one-click operation; ignore it and the same refusal returns on every attempt.
What the merge error actually measures before it will let you merge
Excel's merge rule is narrower than most people assume. It compares the row height and column width of every cell in the selection, and it also checks that each cell is empty except for the one holding your data. According to Microsoft's Excel support documentation, the "same size" requirement applies specifically to the width of the columns and the height of the rows covered by the selection; alignment differences alone can still trip a merge in some versions. That's why two cells sitting side by side at 68 pixels and 84 pixels wide won't combine.
The check happens at the moment you press Merge & Center or open the Format Cells merge options. Excel isn't measuring text, borders, or shading here. It's measuring geometry plus occupancy. If the cell you didn't anchor on contains a stray space, a formula returning an empty string, or a leftover character, the merge fails with an adjacent error even when the dimensions match perfectly.
One practical defense: press Ctrl+ (the backtick key) to toggle formula view. Formulas returning ""` look blank on the grid but block merges. If a cell looks empty and the merge still refuses, that toggle reveals whether a formula is hiding there.
The date matters for one narrow case. In the version of Excel shipped with Microsoft 365 in late 2026, the Merge & Center control still lives in the same place: Home tab, Alignment group. Nothing about that placement changes the rule described above.
The two clicks that equalize row height and column width
Start with the fastest fix. Select the cells you want to merge, then go to Home, Format, and use "AutoFit Row Height" and "AutoFit Column Width" in sequence. Both commands snap each row and column in the selection to the size of its own content, which makes every selected cell identical in the chosen dimension. Run both, then attempt the merge again. In most worksheets this clears the block immediately.
If AutoFit settles on different sizes because the content lengths differ, force equality manually. With the selection active, open Home, Format, Row Height and type a single number, say 20, then repeat with Format, Column Width at a single number like 10. Explicit values override content-driven sizing and guarantee every selected cell matches. Column width in Excel is measured in characters of the default font, which is where numbers like 8.43 come from on a fresh sheet.
For a whole-sheet reset, click the triangle where column A meets row 1 to select everything, then AutoFit both dimensions from the Format menu. This is the nuclear option and can make very wide sheets harder to read, so prefer it when you're cleaning a layout rather than fixing a single merge.
A named shortcut worth keeping: pressing Ctrl+A inside a data block selects the current region, then Alt, H, O, I auto-fits column width in the Windows version. Confirm the exact key sequence for your build on Microsoft's keyboard shortcut reference, since macOS Excel uses different combinations.
Same size still failing: the hidden merges sitting in your selection
Here's the edge case the sizing advice omits. Excel's "same size" refusal isn't only about mismatched rows and columns; it also fires when an existing merged block overlaps the cells you're trying to merge. Say A1:B1 is already merged and you select A1:C1 to merge wider. The cell sizes now match, but the old merge still sits inside the new selection, and Excel blocks the operation because merging over an existing merge can destroy data.
The remedy is to unmerge first. Select the region, go to Home, Merge & Center dropdown, and choose Unmerge Cells. Then rebuild the block. Check for this before you spend time resizing: a sheet that occasionally refuses legitimate merges after a colleague's edits usually carries a stale merge somewhere in the range.
There's a second hidden trap: merged cells break sorting and filtering. If you try to sort a column containing a merged cell, Excel reports that every cell in the range must be the same size β the same error family, but here it's caused by the merge, not by sizing. Unmerging the affected areas is the only reliable way to sort that range. Microsoft's documentation on the "all merged cells need to be the same size" error explicitly names sorting and filtering as common triggers.
A quick diagnostic before resizing: press Ctrl+F, then use the Find Format option and set Alignment to "Merge cells" via Format, Alignment. That search highlights merged blocks you may have forgotten, so you can unmerge them before attempting anything else.
Step-by-step: clear the error and get a clean merge
The numbered sequence below is the order that actually resolves this in practice. It assumes you're working in a recent Windows or Mac Microsoft 365 build with the standard ribbon.
1: Select only the cells you intend to combine, then check the Name Box (top left) to confirm the range is exactly what you think. 2: Unmerge any existing merges inside that range: Home, Merge & Center dropdown, Unmerge Cells. 3: Remove hidden occupants: select cells, press Delete, then Ctrl+` to expose formulas returning empty strings. 4: Equalize dimensions: Home, Format, AutoFit Row Height, then AutoFit Column Width. 5: If the sizes still differ, set explicit values: Home, Format, Row Height (single number), then Column Width (single number). 6: Re-select the range, go to Home, Merge & Center, and pick Merge Cells, Merge & Center, or Merge Across. 7: Save the file before moving on; merged cells interact badly with pasted data and a save gives you a clean recoverable point.
If the merge button is greyed out after step 6, don't assume the first attempt failed. Open the dropdown and confirm which merge option you clicked; Merge Across behaves differently from Merge Cells and treats each row independently. If a dialog still complains, re-check step 2: a nested merge is the single most common cause of a refusal that survives proper resizing. When the grid is protect-enabled, the merge is blocked by sheet protection, not by cell size; open Review, Unprotect Sheet first.
The failure-handling close matters here: keep a backup copy of the sheet before running AutoFit on a whole block, because AutoFit can shrink a row and hide text that was previously visible.
A comparison of four ways to make cells equal, from manual to scripted
Different situations call for different equalization methods, and the trade-offs aren't obvious until you hit a large sheet. The table below compares the four routes I see used most often.
| Method | Where to find it | Best for | Known drawback |
|---|---|---|---|
| AutoFit Row Height / Column Width | Home > Format | Quick single-selection fixes | Content-driven, may leave cells unequal if text lengths differ |
| Explicit Row Height and Column Width values | Home > Format > Row Height / Column Width | Guaranteeing identical size | Overrides useful auto sizing and can hide text |
| Select-all triangle + AutoFit | Click corner of A1 | Whole-sheet cleanup | Resizes every column, often making wide sheets unreadable |
| Format Painter copy | Home > Format Painter | Copying one cell's size to another | Copies all formatting, not just dimensions; wipes custom borders |
Verdict: for a one-off merge, explicit values are the most reliable route because they ignore content differences. For repeated layouts, AutoFit plus a template is faster. The format-painter method is the weakest option of the four for this job; it smuggles alignment and border changes into cells you wanted untouched.
One time computation: a 12-column block with 300 rows resized by hand takes roughly 15 minutes; the same block via explicit row and column values takes under 60 seconds once you've opened Format. The gap is why scripted or template-based layouts pull ahead on workbooks that need regular merges.
Why fresh rows and pasted data break a merge you just fixed
A merge that worked yesterday can fail today after a paste. When you paste rows from another workbook, Excel brings the source's row heights and column widths with it, and any height mismatch reintroduces the error. Pasting as "Keep Source Formatting" carries dimensions across; pasting as "Values" drops formatting but also drops the visual layout you may need. The safer habit is to paste values, then equalize the affected rows before merging again.
Row insertion does something similar. Adding a row above a merged block can leave the new row at a default height that differs from its neighbors, so a later selection spanning them refuses to merge. Set explicit row heights on the whole region once, rather than trusting the default.
There's a lesser-known interaction with filtered data. If a filter is active and you select visible cells only, Excel may try to merge a non-contiguous range, which the merge tool rejects regardless of size. Clear the filter before merging; visible-only selections hide row gaps that the merge can't span.
Keep one habit from all this: equalize first, merge second, and save between the two. The order is the whole fix.
Design sense: when equalized cells are the wrong answer
Merging cells looks tidy in a mockup and turns into a maintenance burden in a working sheet. Once cells merge, you lose the ability to sort the column, Ctrl+arrow navigation behaves unpredictably, and filters skip the merged block entirely. A reader scanning with the keyboard lands on the merged cell and jumps past its neighbors. That's a real cost, and it explains why most professional models avoid merges for data regions.
If your goal is presentation, try "Center Across Selection" instead. Select the range, press Ctrl+1, open the Alignment tab, and choose Center Across Selection from the Horizontal dropdown. The text centers over the empty cells without combining them, so sorting, filtering, and formulas keep working. It won't work for a single text block spanning many rows, but for headers it's the cleaner option.
For genuinely merged presentation blocks, keep them outside the data range: a title strip across the top, a footer note at the bottom. Keep the grid itself unmerged. This separation prevents the stitched-together look that makes a spreadsheet feel messy.
Regional and version quirks worth knowing before you resize
Excel's size checks behave consistently across desktop versions, but the surfaces differ enough to trip you up. On the web version of Excel in Microsoft 365, the Merge & Center button sits in the Home tab with the same rule, but you can't set custom row heights above a certain limit from the browser. On macOS Excel, the Format menu path is Home > Format > Row Height and Column Width, and the AutoFit commands sit in the same submenu. The dialog naming is identical; the keyboard shortcuts are not.
Regional settings change the units. Sheet dimensions in Excel are measured in points for row height and characters for column width; some regional builds display the height in points, some in pixels, depending on the display scaling. Setting Row Height to 20 in one locale can produce a visibly shorter row than 20 in another if your display scaling differs. When a merge still fails after equalizing, compare the number on the Format dialog across the cells rather than eyeballing the row.
Google Sheets doesn't share Excel's same-size rule. Its merge function uses a different algorithm and generally permits merging uneven cells, though it warns before discarding content. If you're moving a sheet from Excel to Sheets, expect the behavior to change. Tools that clean up mismatched merges need to be checked per platform.
Microsoft's own support pages treat this message as a merge conflict, not a bug, and the fix they describe is the resize-then-merge sequence above. Nothing in the 2026 builds I'm aware of changes that underlying rule, though the exact wording of the error dialog shifts slightly between release channels. If your dialog reads differently, checking Microsoft's Excel help entry for "merged cells must be the same size" gives the current wording and the supported workflow for your build.
Merging into a table header without wrecking the table
Header rows are where merging feels most natural and causes the most downstream trouble. A table header that spans several columns as a merged cell stops the table's own filters from working, and slicers attached to the table may misbehave. If you're merging purely for a printed header, a better pattern is to leave the header row unmerged, apply a background fill across it, and center the text using Center Across Selection. The printed result reads as one strip without the functional cost.
If a real merge is unavoidable, say a report title above a column set, keep it on a separate row above the data table so it never sits inside the filtered range. Then the merge is decorative and the table stays sortable. That separation is a small layout decision that saves significant debugging time later.
Document any merged blocks in a template note. A cell comment on the merged block saying "merged for display only" prevents the next editor from trying to sort through it. The comment travels with the file and shows on hover.
Keep a printed style guide handy if several people edit the workbook. The rule that works: merge above the table, never inside it.
FAQ
What does "to do this, all the merged cells must be the same size" mean exactly?
It means Excel won't combine the selected cells because their row heights or column widths differ, or because an existing merge already sits inside the selection. Excel checks dimensions on every cell in the range before it allows the operation. Equalizing both dimensions usually clears the message in one or two clicks. If resizing alone doesn't fix it, look for a stale merge hiding in the range.
Why does my merge still fail after I resize every cell?
A nested merge is the most common culprit. If the cells were merged previously and unmerged only partially, an old merge still occupies the range and blocks the new one. Unmerge the entire selection, then re-merge it. A formula returning an empty string can also block the merge even though the cell looks blank; Ctrl+` reveals it.
Can I merge cells that already contain data in more than one cell?
No, not without losing data. Excel's merge keeps only the value in the upper-left cell of the selection and discards the rest. If multiple selected cells contain values, Excel normally warns before discarding, but the warning depends on the version. Copy the values elsewhere before merging if you need to preserve them.
How do I fix this on Google Sheets instead of Excel?
Google Sheets doesn't enforce the same-size rule, so the error usually doesn't appear there. If you're migrating an Excel sheet, note that Google Sheets may handle uneven merges differently and can discard content on merge. Accept the Sheet's merge prompt only after checking what will be removed; the warning names the affected cells.
Does merging cells break sorting and filtering?
Yes. A merged cell inside a data range stops a sort from running and makes filters skip the block. Excel treats the merged area as a single cell and can't map it back to a column during a sort. Unmerging is the only dependable fix; keeping merges out of data ranges is the simpler habit to build.
Is Center Across Selection a real substitute for merging headers?
For header styling, yes. It centers text across adjacent blank cells without combining them, so sorting, filtering, and formulas keep working. It can't do what a multi-row merge does for a large text block, but for single-row headers it's the cleaner choice. Select the cells, press Ctrl+1, and set Horizontal alignment to Center Across Selection.
What's the risk of setting a single fixed row height across a large block?
Text can disappear. Fixed heights override AutoFit, so a row that once expanded to fit wrapped text gets clipped when you apply a specific point value. Excel may still print the hidden text but won't warn you on screen. Preview the sheet before printing or exporting; if text vanishes, restore AutoFit for those rows and merge only the columns you need.
How can I find merged cells I forgot about in a large workbook?
Open Find (Ctrl+F), expand Options, choose Format, then use the Alignment tab to set "Merge cells" and run Find All. That lists every merged region in the workbook so you can review them before sorting or resizing. In very large workbooks, this search can take a few seconds per sheet, but it beats clicking through cells manually.