Skip to content

Smart home, audio and desk gear, chosen with care.

Set It Up

How to Merge Cells in Excel: Keep Your Data Intact

Merging cells in Excel is simple, but it can wreck sorting and formulas. Follow the steps, learn the safe alternatives and fix common mistakes.

Set It Up
Hand on a mouse beside an open laptop on a desk

The short answer: what merging cells actually does

Merging cells combines a rectangular block into one cell that spans the selected rows and columns. The value in the top-left cell stays; anything in the other cells is removed. In Excel, select the cells, open the Home tab, choose Merge & Center, and pick the merge option you need.

Before you start: what you need and what to check

You need Excel on the desktop or Excel for the web, a sheet you can edit, and a clear idea of which value should survive. Work through this short checklist first:

  • Make a copy or check version history. Ctrl+Z will undo a merge immediately, but it will not help once you have saved, closed the file or made many later edits.
  • Decide which value to keep. Excel keeps the upper-left value. If the other cells matter, copy their contents into a helper column before you merge.
  • Check for an Excel Table. Tables do not allow merged cells, so Merge & Center will be greyed out. Convert the table to a normal range only if you can live without table features.
  • Know where the merged range sits. Keep merges out of rows you sort, filter or use as a data source.

How to merge cells in Excel: step by step

  1. 01 /

    Select a rectangular block of cells

    Click the first cell, hold Shift and click the last cell, or drag across the block. The selection must be a rectangle. You cannot merge non-adjacent cells selected with Ctrl.

  2. 02 /

    Open the Home tab and find Alignment

    On the ribbon, open Home and look for the Alignment group. The Merge & Center button sits there. Excel labels it Merge & Center in many English versions; some UK builds show Merge & Centre.

  3. 03 /

    Use the arrow beside Merge & Center

    Clicking the main button applies the standard merge. Click the small arrow instead when you want to choose a different option.

  4. 04 /

    Choose the merge option that fits

    Pick Merge & Center for one centred title, Merge Across to merge each row separately, or Merge Cells to combine the block without changing alignment.

  5. 05 /

    Set alignment, wrapping and row height

    Use Wrap Text and the horizontal and vertical alignment buttons to position the content. Merged cells often need a manual row height; do not rely on AutoFit to size them.

  6. 06 /

    Check the result before you save

    Click the merged cell and look at the Name Box, which shows the top-left reference such as A1. The Formula Bar shows the value that survived. If the wrong value was kept, press Ctrl+Z at once.

The four merge options compared

What each option does to a selected rectangular block.
OptionWhat it doesBest for
Merge & CenterCombines all selected cells into one and centres the content.A single title over several columns.
Merge AcrossMerges each row in the selection separately, leaving one merged cell per row.Row-by-row labels where each row spans several columns.
Merge CellsCombines all selected cells into one without changing alignment.When you want the shape but will set alignment yourself.
Unmerge CellsSplits the merged cell back into the original individual cells.Correcting a layout or restoring a sortable range.

How to merge cells without losing data

Excel cannot keep every value in a merged range. It keeps the upper-left value and discards the rest after showing a warning. If the other cells contain text you need, combine the values before you merge.

  1. 01 /

    Create a helper column

    In an empty column, build the combined text, for example =A2&" "&B2. In Excel 2019, Excel 2021 and Microsoft 365 you can also use =TEXTJOIN(" ",TRUE,A2:C2).

  2. 02 /

    Copy the combined text into the top-left cell

    Copy the helper result and paste it into the top-left cell of the range you plan to merge. Use Paste as Values so the merged cell contains text, not a formula that depends on cells you are about to remove.

  3. 03 /

    Merge the range

    Select the range, open Home > Merge & Center and choose the merge option you need. The combined value in the top-left cell survives the merge.

  4. 04 /

    Tidy up and check the Formula Bar

    Delete or hide the helper column once the layout is correct. Keep a backup copy if you still need the original separate values.

How to unmerge cells and clean up the layout

  1. 01 /

    Select the merged cell

    Click anywhere inside the merged block. The Name Box shows the top-left reference, such as A1.

  2. 02 /

    Choose Unmerge Cells

    Open Home > Merge & Center, click the arrow and choose Unmerge Cells. On Windows, the key sequence Alt, H, M, U also works.

  3. 03 /

    Repair the layout

    The content stays in the top-left cell and the other cells become blank. Fill any gaps, check formulas that referred to the merged block, and reapply borders or fills.

Keyboard shortcuts and faster routes

Excel has no single default shortcut that works on every platform, but Windows ribbon key tips are reliable: press Alt, H, M, C in sequence for Merge & Center; Alt, H, M, M for Merge Cells; Alt, H, M, A for Merge Across; and Alt, H, M, U for Unmerge. Press the keys one after another, not together.

On a Mac, use the ribbon or add the command to the Quick Access Toolbar where your version allows it. You can right-click the Merge & Center button and add it to the toolbar, then use the toolbar's Alt+number shortcut on Windows.

Common problems and how to fix them

  • Merge & Center is greyed out. Check whether the sheet is protected, whether a cell is still in edit mode (press Esc), or whether the range sits inside an Excel Table. Unprotect the sheet or convert the table to a normal range only if merging is essential.
  • Excel says the merged cells must be identically sized. This usually appears when sorting or pasting near merged blocks of different shapes. Unmerge the range, sort or paste, then merge again if you must.
  • Only one value survived. Press Ctrl+Z immediately. If you cannot undo, rebuild the lost values from a backup copy or combine them with a helper formula next time.
  • A formula returns 0 or the wrong figure. Check whether it points to a cell inside a merged range. Point formulas at the top-left cell or unmerge the range.
  • Pasting fails or overwrites the wrong area. The paste area must match the merged layout. Unmerge, paste, and merge again if the layout still needs it.
  • Row height will not fit the text. Merged cells do not auto-fit reliably. Use Wrap Text and set the row height manually.

Safer alternatives to merging cells

  • Center Across Selection. Select the cells, press Ctrl+1, open the Alignment tab and set Horizontal to Center Across Selection. The text looks centred across the selection without creating a merged cell, so the columns stay sortable. It only works horizontally.
  • Widen the column and wrap text. For a long heading in one cell, turn on Wrap Text and increase the row height. This keeps the data structure intact.
  • Put a title in one cell above the data. A heading in A1 can look just as good as a merged A1:F1, especially when it sits outside the table.
  • Combine values with & or TEXTJOIN. Use a helper column when you need one cell to contain text from several cells.
  • Use borders and blank cells for forms. Merged input areas can complicate copy, paste and data validation. A clean border around separate cells is often the safer layout.

Merging cells for print and presentation

Merging is most defensible for printed titles, form labels and dashboard headers that sit outside the data range. If you merge a title across A1:F1, leave row 2 as a normal header row so sorting and filtering still work.

Set the print area and page breaks before you merge. Merged cells can push columns wider than expected, so check Print Preview rather than assuming the layout will fit.

Frequently asked questions

Does merging cells keep all the text?

No. Excel keeps the value from the upper-left cell and removes the rest after showing a warning. Use a helper formula first if you need to preserve every value.

Can I merge cells vertically?

Yes. Select a vertical block and choose **Merge Cells**. **Merge Across** is different: it merges each row in the selection separately.

Why can't I merge cells in an Excel Table?

Excel Tables do not support merged cells, so the command is unavailable. Convert the table to a normal range if merging is essential, but you lose table features such as structured references.

Is there a shortcut for Merge & Center?

On Windows, try Alt, H, M, C in sequence. There is no single default shortcut on every platform; you can add the command to the Quick Access Toolbar and use its Alt+number shortcut.

Can merged cells be sorted?

Not reliably. Sorting a range with merged cells usually throws an error or produces misaligned rows. Unmerge before sorting, then merge again afterwards only if the layout requires it.

Does unmerging restore the hidden values?

No. Unmerging only splits the cell; data removed during the original merge is not restored. Use Ctrl+Z immediately if you have just merged by mistake.

Search