Merge Cells in Excel: Keyboard Shortcuts and Steps

How-to basics · Updated November 2, 2026

Merge Cells in Excel: Keyboard Shortcuts and Steps

In Excel for Microsoft 365 on Windows, select the cells and press Alt+H, M, C—one key sequence at a time—to merge them and center the contents of the upper-left cell. Before merging, move any other cell contents you need to keep: Excel retains only the upper-left cell’s value. The instructions below explain the other merge options, how to undo a merge, and what to do if the shortcut is unavailable.

What You’ll Need

  • A workbook open in the desktop version of Excel for Microsoft 365 on Windows.
  • A rectangular range of adjacent cells you want to combine visually. The cells must not be inside an Excel table.
  • A saved copy or a plan for preserving any contents outside the upper-left cell before you merge.

The keystrokes in this guide use Excel’s Windows ribbon KeyTips. They are access-key sequences, not keys to hold down together: press Alt, then H, then M, then the final letter for the option you want. Excel for Mac does not use this same Windows sequence; Mac alternatives are covered below.

Step-by-Step

  1. Check the range and its contents. Identify the cells that should become one larger cell, and confirm that the selection will be a single rectangle. Excel can merge a rectangular range, but it cannot merge separated cells such as A1 and C1 while leaving B1 out. Look through the range for values, formulas, or text that must be preserved. A merge keeps the contents in the upper-left cell of the selected range and removes the contents in the other cells. Copy needed information elsewhere first, or combine it into one cell before merging.
  2. Select the cells. Click and drag across the range, or click its top-left cell, hold Shift, and click its bottom-right cell. You can also click the Name Box to the left of the formula bar, type a range such as A1:D1, and press Enter. Check the highlighted area before continuing; selecting one cell will not merge a group, and selecting an unintended extra row or column can produce a layout you did not want.
  3. Open the Merge & Center options. Press and release Alt, then press H, then M. The first key opens ribbon KeyTips, H selects the Home tab, and M opens the merge options. Do not press all four letters as one simultaneous shortcut. If KeyTips do not appear, click back into the worksheet and try again; some dialog boxes or active editing in a cell can prevent the ribbon sequence from working.
  4. Choose the right merge command. Press C for Merge & Center, which combines the selection and centers the surviving contents. Press M for Merge Cells, which combines the cells without applying the centering action. Press A for Merge Across, which makes a separate merged cell for each row in a multirow selection. If the selected cells are already merged, press U for Unmerge Cells. The letters are choices in the open menu, not extra keys to hold with Alt.
  5. Respond to the data warning. If more than one selected cell contains data, Excel displays a warning that only the upper-left value will be kept. Read the message before confirming. Choose the option to continue only if losing the other cell contents is acceptable or you have already saved them. Choose Cancel if you need to copy or combine the contents first. If there is only one nonempty cell in the range, Excel may merge without showing this warning.
  6. Check the result and alignment. Confirm that the merged boundary covers the intended cells and that the text is visible. Merge & Center centers the contents horizontally; it does not automatically make every other formatting choice you may want. Use the alignment controls on the Home tab if you also want vertical centering, wrapping, or a different horizontal alignment. If the text appears cut off, adjust the column width or row height, or enable Wrap Text.
  7. Undo or reverse the merge if needed. Press Ctrl+Z immediately after an unwanted merge to undo it. If you want to separate the cells later, select the merged cell and use Alt, H, M, U. Unmerging restores the original cell boundaries but does not restore values that were discarded during the merge. If you need those values, use Undo while the action is still available or recover them from a saved copy.

For a mouse-based alternative, select the range and choose Home > Alignment > Merge & Center. Use the arrow beside the ribbon button to select Merge Across, Merge Cells, or Unmerge Cells. This path is useful if you forget a KeyTip or prefer to confirm the command name before applying it.

Common Mistakes

Assuming the shortcut preserves every value. It does not. Only the upper-left cell’s contents survive; the rest are discarded when the merge is confirmed. If several entries matter, copy them to another location first or combine them into the upper-left cell using a suitable method before merging.

Pressing the keys simultaneously. Alt+H, M, C is a sequence of ribbon access keys. Press Alt and release it, then press H, M, and C in turn. If you hold Alt while typing the whole sequence, or type the letters into a cell, you may not activate the command.

Choosing Merge Across when you want one large cell. Merge Across creates one merged cell per row. For a selection such as A1:C3, it merges A1:C1, A2:C2, and A3:C3 separately. Use Merge & Center or Merge Cells if the goal is one merged area spanning all three rows and columns.

Trying to merge cells in a formatted table. Excel does not allow merged cells inside an Excel table. Convert the table to a normal range first, if that is appropriate for your workbook, or use Center Across Selection as a visual alternative without merging. Merged layouts can also make sorting, filtering, copying, and selecting data less predictable, so avoid them in data tables.

Tips

Use Merge & Center mainly for headings or labels that sit above a group of columns, rather than for the body of a dataset. A merged heading can make a report easier to read, but regular unmerged cells are generally more practical for lists that will be sorted, filtered, or analyzed. Keep headings and data in separate areas when possible.

If you want text centered across several columns but need to keep every cell independent, select the range, open the Format Cells dialog with Ctrl+1, choose the Alignment tab, and set Horizontal to Center Across Selection. This is not a merge: the cells remain separate, and their contents are not discarded. It is often a safer choice for worksheet titles that need to look centered without changing the grid structure.

For repeated tasks, remember the three most useful Windows sequences: Alt, H, M, C for Merge & Center; the same sequence ending in M for Merge Cells; and the same sequence ending in U to unmerge. The final letter depends on the menu choice, so pause after M if you need to check the options shown on screen.

On Excel for Mac, use the ribbon rather than the Windows KeyTip sequence: select the range, open the Home tab, and choose the arrow beside Merge & Center to pick the merge option. The ribbon layout can vary with window size and version. Excel for the web may also display a different ribbon or keyboard behavior, so use the visible merge control there instead of assuming the Windows sequence will work in a browser.

Troubleshooting

Nothing happens after Alt. Click a worksheet cell so Excel, rather than a text box or another app, has focus. Press and release Alt again and look for KeyTips on the ribbon. If a cell is being edited, press Esc to leave edit mode, then retry the sequence. You can also use the Home tab’s Merge & Center dropdown directly.

The wrong option runs. Start again with Alt, H, M and read the letters beside the menu commands before choosing the final key. If the ribbon menu is not open, the last letter may do something else or be typed into the worksheet. Click the dropdown and choose the named option with the mouse if you are unsure.

Excel says merged cells must be the same size. This often occurs when trying to sort a range that includes merged cells of different shapes, rather than while performing the merge itself. Unmerge the affected cells, make the range consistent, and sort again. For a sortable or filterable dataset, avoid merged cells and use formatting or Center Across Selection for appearance.

The merge command is unavailable. Check whether the selection is inside an Excel table, whether the sheet is protected, and whether the workbook or worksheet is in a restricted editing state. A range inside a table cannot contain merged cells; convert the table to a range only if you are comfortable losing table-specific behavior. If protection is on, you may need permission or the appropriate password before changing the layout.

The text seems to disappear after merging. Check the formula bar when the merged cell is selected. If the text was in a cell other than the upper-left cell, it may have been discarded; unmerging will not bring it back. If the text is still in the surviving cell but not visible, widen the column, increase the row height, turn on Wrap Text, or adjust the alignment.

Frequently Asked Questions

What is the keyboard shortcut to merge cells in Excel?
In Excel for Microsoft 365 on Windows, press and release Alt, then H, M, C to use Merge & Center. Choose the final letter for the option you need: M for Merge Cells, A for Merge Across, or U for Unmerge Cells.

Does Merge & Center keep the contents of all selected cells?
No. It keeps the value or formula in the upper-left cell and discards contents from the other selected cells after you confirm the warning. Save or combine any information you need before merging.

How do I merge cells without centering the text?
Use the sequence Alt, H, M, M, or select Merge Cells from the Home tab’s merge dropdown. The cells merge, but Excel does not apply the centering action of Merge & Center. You can set alignment separately afterward.

Can I merge cells in Excel for Mac with the same shortcut?
The Windows Alt+H, M sequence is not the standard Mac equivalent. On Mac, select the cells and use the Merge & Center dropdown on the Home tab. If you need a keyboard-only workflow, check the shortcuts available in your specific Excel for Mac version and macOS settings.

Can I undo a merge and get all the original data back?
Ctrl+Z can reverse the merge immediately, including its data changes, if the merge is still the most recent undoable action. Unmerge Cells restores the separate cell boundaries, but it cannot recover contents that were removed from non-upper-left cells.

Why can’t I merge cells in an Excel table?
Excel tables do not support merged cells. Convert the table to a normal range if you accept the loss of table features, or leave the cells separate and use alignment or formatting to create a similar visual effect.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.