To merge selected cells in Excel for Microsoft 365 on Windows, select the range and press Alt, H, M, M one key at a time. This runs Home > Merge & Center > Merge Cells. If you mean joining the text from several cells while keeping every value, use a formula instead: merging cells keeps only the top-left cell’s content.
The distinction matters: Excel’s merge command changes the cell layout; it does not combine the contents of the selected cells. Check what is in the range before using the shortcut, especially if the cells contain information you need.
What You’ll Need
- Excel for Microsoft 365 on a Windows computer, with the workbook open and editable. The keyboard sequence below is for Excel’s English-language Windows desktop version.
- A rectangular range of adjacent cells to merge. Select at least two cells, such as A1:C1, before using the command.
- If each cell’s text must be kept, either copy the original data first or plan to use a formula to join the contents instead of merging.
Step-by-Step
-
Decide whether you want a merged cell or combined text. Use Merge Cells when the goal is one larger cell, often for a heading spanning several columns. Use a formula when you need to bring separate values together as text and preserve the original cells. For example, merging A1:C1 does not concatenate the three entries; it retains only the value in A1.
-
Save or check the data before merging. Look across every cell in the range, not just the first one. If any cell after the top-left cell contains a value or formula you need, copy it elsewhere before continuing. You can also press Esc to leave the selection unchanged if you discover content you do not want to lose.
-
Select the cells you want to merge. Click the first cell and drag across the rest, or click the first cell, hold Shift, and select the last cell in the rectangular range. You can also click the Name Box to the left of the formula bar, type a range such as A1:C1, and press Enter. Confirm that the highlighted selection is the intended range.
-
Run the Merge Cells shortcut. Press and release Alt, then press H, M, and M, in that order. Do not hold all four keys together. In Excel’s English Windows interface, this key sequence opens the Home tab’s merge commands and chooses Merge Cells. It merges the selected cells without applying the centering action in Merge & Center.
-
Check the result and the retained value. The range should now behave as one larger cell. The content from the upper-left cell remains; content in the other cells in the selection is removed. If the displayed text appears cut off, the value may still be there: adjust the column width, row height, or alignment rather than merging more cells.
-
Choose a different merge option only if it suits the layout. For a centered heading, use Alt, H, M, C for Merge & Center. That merges the range and centers the retained top-left value. To merge each row of a multirow selection separately, choose Merge Across from the merge dropdown. Check the result carefully because it does not create one large cell across the full selection.
-
Undo promptly if the wrong cells were merged. Press Ctrl+Z on Windows immediately after the action. This restores the previous cell layout and contents when the merge is still the most recent action. If you have made other edits since then, use the Undo button or undo history carefully so you do not reverse unrelated work.
To join text rather than merge the cells: with the first text in A2 and the second in B2, enter this in another cell, such as C2. The formula joins the values with one space and leaves A2 and B2 intact.
With the first part in A2 and the second part in B2, =TEXTJOIN(" ",TRUE,A2,B2) returns North Region when A2 contains North and B2 contains Region. TEXTJOIN is available in Excel 2019 and later, including Microsoft 365. The formula result is text in C2; it does not create a merged cell. You can fill the formula down for additional rows, then copy and use Paste Special > Values if you need a fixed text result.
Common Mistakes
Assuming merge means concatenate. This is the most important distinction. If A1 contains a first name and B1 contains a last name, merging A1:B1 will not produce a full name. It keeps the value from A1 and discards the value from B1. Use a joining formula or another data-combining method when both values matter.
Selecting the wrong range. A shortcut acts on the current selection, so a stray cell or an oversized range can produce an unexpected layout. Before pressing the keys, look at the highlighted cells and confirm the top-left cell is the one whose value should remain.
Choosing Merge & Center by habit. Merge & Center also changes the alignment of the retained value. For a merged cell that should keep its existing alignment, choose Merge Cells instead. The two commands are separate options in the merge dropdown and have different results.
Using merged cells in a data table. Merged cells can interfere with sorting, filtering, filling formulas, and selecting consistent ranges. They are usually best reserved for presentation, such as a report heading, rather than the body of a sortable list or dataset.
Tips
Use merging sparingly and keep the source data in a simple, unmerged layout whenever possible. A title across several columns can look tidy, but merging cells in the middle of a list can make later edits awkward. If you need a heading to look centered across columns without changing the cell structure, consider selecting the range and using the horizontal alignment option Center Across Selection in the Format Cells dialog instead. Unlike merging, that keeps the cells separate.
For a heading, consider Merge & Center if centered alignment is wanted; for a label aligned to the left, use Merge Cells. After merging, you can still apply formatting such as borders, fill color, font style, and wrapping. Formatting does not recover any values discarded from the non-top-left cells, so it is not a substitute for checking the range first.
Remember the sequence as Alt, H, M, M: Alt opens the ribbon key tips, H selects Home, M opens the merge menu, and the second M selects Merge Cells. You can press Alt and watch the letters displayed on your ribbon if you need to confirm the next key. Key tips can differ in localized versions of Office, so the visible letters may not match the English sequence.
On Excel for Mac, do not rely on the Windows Alt sequence. Select the range and use the Home tab’s Merge & Center dropdown to choose the appropriate merge command. The exact ribbon presentation can vary by Mac build and window size. In Excel for the web, select the range and use the merge control on the Home tab; browser and platform keyboard handling can differ, so use the ribbon if the Windows key sequence does not work.
Troubleshooting
The shortcut types letters into the sheet or does nothing. Make sure you are in Excel’s worksheet, not editing text inside a cell or a formula bar. Press Esc once to exit cell-editing mode, select the range again, and press the keys in sequence rather than holding them all at once. If your Office interface is not English, use the ribbon dropdown because the key-tip letters may differ.
Excel warns that merging keeps only the upper-left value. This is expected when other selected cells contain data. Cancel the operation if you need those entries. Copy them to another location or combine them with a formula first, verify the results, and then merge only if the larger cell layout is still needed.
The merge command is unavailable. Check that you selected a normal worksheet range and that the workbook is not protected in a way that prevents formatting changes. Excel does not allow cells inside an Excel Table to be merged. If the selected cells are part of a table, convert the table to a range only if that is appropriate for your workbook, or place the heading outside the table.
The merged text is not fully visible. The value may be present but clipped by the row height or display width. Try widening the columns, increasing the row height, or turning on Wrap Text. Remember that a merged range does not necessarily resize like a single ordinary cell, so adjust the layout and inspect the printed or exported result as well.
You need to reverse a merge later. Select the merged cell and press Alt, H, M, U on English Windows to unmerge it, or choose Unmerge Cells from the Home tab’s merge dropdown. Unmerging restores separate cells but does not restore the values that had been removed from the other cells. Use Undo if you need to recover those values and the merge is still in the undo history.
Frequently Asked Questions
What is the shortcut to merge cells in Excel?
In Excel for Microsoft 365 on Windows with the English interface, select the cells and press Alt, H, M, M one after another. This selects Merge Cells. For Merge & Center, use Alt, H, M, C.
Does merging cells combine all their contents?
No. Excel keeps the content in the upper-left cell of the selection and removes content from the other cells. To retain and join multiple values, use a formula or copy the values into a single cell before merging.
Can I merge cells without centering the text?
Yes. Choose Merge Cells rather than Merge & Center. The merge command creates one larger cell but does not apply the centering action built into Merge & Center. You can set the alignment separately afterward.
How do I merge cells on a Mac?
Select the range, open the Home tab’s Merge & Center dropdown, and choose the merge option you want. The Windows Alt key-tip sequence is not the Mac equivalent; using the ribbon avoids confusion between versions.
Can I merge cells in an Excel table?
No, Excel does not allow merging cells within a formatted Excel Table. Keep the table unmerged for sorting and filtering, and put a merged title above the table if the layout calls for one.
How do I undo a merge without losing the original values?
If the merge was your latest change, press Ctrl+Z on Windows to undo it and restore the earlier cell contents. If you unmerge later, the other original values will not automatically return; unmerging only separates the cells again.
Related
- Excel Bar Names: What Each Part of the Window Does
- Excel Day Tracker: Build a Daily Log for Work and Habits
- Excel Day Trading Journal: Build a Useful Trade Log
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Large Excel File Won’t Open? Causes and Practical FixesIf a large Excel file won’t open, first copy it to a local drive, close other programs, and…
- Excel Shortcut to the End of Data: Keys and LimitsIn Excel for Microsoft 365 on Windows, press Ctrl+Down Arrow to jump to the edge of the current…
- Excel Strikethrough Shortcut: Ctrl+5 and MoreIn Excel for Microsoft 365 on Windows, select the cell or cells and press Ctrl+5 to apply strikethrough;…
- Group Rows in Excel by the Same NameTo group rows that share a name, first sort the entire data range by the Name column so…
- Excel New Blank Workbook: Create, Save, and Set It UpTo create a new blank workbook in Excel for Microsoft 365 on Windows, press Ctrl+N, or select File…
- Switch Excel Number Format: Quick Steps and FixesTo switch an Excel number format, select the cell or range, then choose Home > Number Format and…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.