In Excel for Microsoft 365 on Windows, select the cells and press Alt, H, M, C in sequence to use Merge & Center. For other merge choices, press Alt, H, M, then M to merge without centering, A to merge across rows, or U to unmerge.
The Windows shortcut and what the keys mean
These are ribbon Key Tips, not keys to hold down at the same time. Press and release Alt to show the Key Tips, press H to open the Home tab commands, then M to open the Merge & Center menu. Press the final letter for the command you want. The sequence is useful when you want to keep your hands on the keyboard, but its final letter matters: C, M, A, and U trigger different actions.
- Alt, H, M, C: Merge & Center.
- Alt, H, M, M: Merge Cells, without applying horizontal centering.
- Alt, H, M, A: Merge Across, merging each row of the selected area separately.
- Alt, H, M, U: Unmerge Cells.
If a letter does not appear to work, tap Alt and look at the Key Tips Excel displays; do not type the whole sequence as one simultaneous shortcut. Key Tips can vary with ribbon layout, language, and version. You can also choose the command directly from Home > Merge & Center, using the dropdown arrow for the other options.
What each merge command does
Merge & Center combines the selected cells into one larger cell and centers the remaining content horizontally. Merge Cells also combines the selection, but does not center its content. The content’s existing alignment settings otherwise remain relevant. These two commands merge the entire selected rectangle into one cell, rather than making a separate merged cell for every row.
Merge Across is different: it makes one merged cell for each row in the selected range. For example, selecting A1:C3 and choosing Merge Across creates three merged cells—A1:C1, A2:C2, and A3:C3. It does not create one large cell spanning all nine cells. This can suit row-by-row headings, though it still creates merged cells with the same limitations described below.
Unmerge Cells removes the merged-cell structure and restores the original cells. It does not restore content that was discarded when the cells were first merged. If the source cells contained values, undo immediately with Ctrl+Z when appropriate, or restore the original values from a backup or another copy.
How to merge cells without losing work
Before merging, check both the selection and its contents. Excel retains the value or formula in the upper-left cell of a merged range and removes the contents of the other cells. If those cells contain information, Excel may show a warning; accepting the merge still means the other contents are lost. A merged cell can display only one cell’s content, so this is not a way to combine text from several cells.
- Select the cells you intend to merge. You can use the mouse or select a starting cell and extend the selection with Shift and the arrow keys.
- Check that the upper-left cell contains the content you want to keep. Copy any other values or formulas elsewhere first if they matter.
- Press Alt, H, M, then choose C, M, or A based on the result you need. Alternatively, use the Home tab’s Merge & Center dropdown.
- Check the result, including alignment and whether the row height or column width still suits the text.
For example, if A1 contains the heading Sales by region and B1 and C1 are empty, selecting A1:C1 and choosing Merge & Center will display that heading in one centered cell. If B1 contains North, that entry will not be appended to the heading; it will be discarded by the merge. If you need a combined label such as Sales – North, construct that text in one cell first or use an appropriate text formula in a separate cell.
Why merged cells can cause spreadsheet problems
Merging is mainly a visual layout feature, and it can make a worksheet harder to work with. A range with merged cells may not behave like an ordinary rectangular data table when you sort, filter, copy, paste, or select a region. For example, sorting a table that contains merged cells can produce an error or require you to change the layout first. A merge that spans several rows can also interfere with selecting complete records consistently.
Merged cells can complicate formulas and references, too. After a merge, only the upper-left cell remains as the cell containing the value; the other positions in the former range are no longer independent places to enter data. If a report, macro, or formula expects each row to have the same columns, merged headings within the data area can make the structure less predictable.
- Keep the actual data table unmerged, with one value per cell and one record per row.
- Use merges, if needed, in title or presentation areas outside the table.
- Before sorting or filtering, check for merges in the range and unmerge them if they obstruct the operation.
- Do not merge cells just to make a label appear centered over several columns; Center Across Selection may be a better fit.
This does not mean merging is always wrong. A small, static report title may benefit from it. The key distinction is whether the cells are part of a working data structure or merely part of a presentation layout.
A safer alternative: Center Across Selection
If your goal is to center a heading over several columns while keeping the cells separate, use Center Across Selection. Select the cells, open the Format Cells dialog with Ctrl+1, choose the Alignment tab, and set the Horizontal dropdown to Center Across Selection. The text remains in the leftmost cell, but appears centered across the selected cells. Unlike a merge, the cells remain independent, which is generally friendlier to sorting, copying, and table structure.
For instance, put Quarterly summary in A1, leave B1:D1 empty, select A1:D1, then apply Center Across Selection. The label is visually centered across the four columns without combining them. This option is most suitable when the cells beside the label are empty and the heading is a visual element, not data that must occupy a single merged cell.
Another option is to leave the label in one cell and adjust column widths, indentation, or alignment. In some layouts, a text box is more flexible for a decorative title. These choices avoid changing the grid’s underlying cell structure, although text boxes are separate objects and may need attention when rows or columns are resized.
Using merge commands on Mac and Excel for the web
The Alt, H, M sequences above describe Excel for Microsoft 365 on Windows. On a Mac, use Home > Merge & Center and its dropdown to choose a merge command; Windows ribbon Key Tips are not the same as Mac keyboard access. Excel for Mac’s available shortcuts can depend on the keyboard, macOS, and Excel setup, so do not assume the Windows sequence is a Mac shortcut. If you need frequent keyboard access, check Excel’s current shortcut and customization options for your Mac version.
Excel for the web also provides the merge commands on the Home tab. Its keyboard behavior may depend on the browser and whether ribbon shortcuts are available, so the reliable route is to select the cells and use the ribbon command. If you are following instructions written for desktop Excel, confirm the labels shown in your web version rather than assuming every ribbon Key Tip behaves identically.
Undoing a merge and recovering contents
If you merged the wrong range or chose the wrong command, press Ctrl+Z on Windows right away to undo the action. On a Mac, use Command+Z. Undo is the most direct way to reverse a recent merge and recover the prior cell contents, as long as the undo history still includes that operation.
Unmerge is not the same as undo. It restores separate cells, but values removed from non-upper-left cells do not reappear. If you discover the issue later, look for a previous saved copy, version history where available, or another source for the lost entries. After unmerging, you may need to restore borders, alignment, or other formatting that was applied to the original range.
Frequently Asked Questions
What is the shortcut to merge and center cells in Excel?
In Excel for Microsoft 365 on Windows, select the cells and press Alt, H, M, C in sequence. This uses ribbon Key Tips to choose Home > Merge & Center; it is not a single simultaneous key combination.
How do I merge cells in Excel without centering?
Select the range and press Alt, H, M, M on Windows, or choose Merge Cells from the Home tab’s Merge & Center dropdown. This merges the selected range without applying the centering action.
Does Excel keep all the text when I merge cells?
No. Excel keeps the content in the upper-left cell and removes content from the other cells in the selection. Copy or combine anything you need to retain before merging.
How do I unmerge cells in Excel?
Select the merged cell and press Alt, H, M, U on Windows, or choose Unmerge Cells from the Home tab’s dropdown. Unmerging restores separate cells but does not recover values discarded during the merge.
Can I merge cells in Excel on a Mac?
Yes. Select the cells and use Home > Merge & Center, then choose the desired option. The Windows Alt Key Tip sequence is not a Mac shortcut; use the ribbon or check the shortcut options for your Mac version.
What should I use instead of merging a heading across columns?
Try Center Across Selection in Format Cells > Alignment. It centers text across a selected range without joining the cells, which can help keep a worksheet easier to sort and manage.
Related
- Excel Data Validation Lists: Setup, Tips, and Fixes
- Excel Group Keyboard Shortcut: Rows and Columns
- Excel Green Highlight Row and Column: How to Turn It On
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Can You Create a Heat Map in Excel? A Practical GuideYes. In Excel for Microsoft 365 on Windows, select your numeric cells and choose Home > Conditional Formatting…
- Audit Working Papers Excel Templates ExplainedYes. Audit working paper Excel templates are available for organizing procedures, evidence, calculations, and review notes, but an…
- Sort by Due Date in Google Sheets: Step-by-StepTo sort tasks by due date in Google Sheets, select the entire task table, open Data > Sort…
- How to Freeze Rows in Google Sheets: A Quick GuideTo freeze rows in Google Sheets in a web browser, open View > Freeze and choose 1 row…
- How to Change the View Percentage in OutlookTo change how large an email appears in Outlook, adjust its zoom: in classic Outlook for Windows, open…
- Change Who Can View an Outlook CalendarTo change who can view an Outlook calendar, open its sharing or permissions settings, select the person or…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.