Yes, Excel can merge cells. To merge cells in Microsoft Excel, select the cells you want to combine, go to the Home tab, and in the Alignment group, click Merge & Center. This combines the selected cells into one larger cell and centers the content. You can also choose Merge Across or Merge Cells from the dropdown menu next to it. Merging is a basic formatting tool that helps create clean headers and labels, but it comes with important limitations you should know before using it.
What Does Merging Cells Actually Do?
When you merge cells, Excel takes two or more adjacent cells and turns them into a single rectangular cell that spans the same area. Only the value in the upper-left cell is kept; data in the other selected cells is deleted (Excel warns you about this before you confirm). The merged cell uses the address of the upper-left cell (for example, merging A1:B1 results in a cell referenced as A1).
There are three merge options in Excel:
- Merge & Center: Merges the selection and centers the content horizontally. This is the most common choice for titles and headers.
- Merge Across: Merges cells in each row of the selection separately, without combining rows together. Useful for creating multiple row headers.
- Merge Cells: Merges the selection into one cell but keeps the original alignment (no centering).
To unmerge, select the merged cell, click the Merge & Center button again (it will be highlighted when the cell is merged), or choose Unmerge Cells from the dropdown.
Why Merging Can Cause Problems
Merged cells are a common source of frustration in Excel because they interfere with many standard operations:
- Sorting and filtering – If a column contains merged cells, sorting or filtering that column may fail or produce unexpected results, because Excel can’t move merged cells independently.
- Copying and pasting – Pasting data into a merged cell can be tricky; the paste area must match the merged cell’s dimensions, otherwise you get an error.
- Formulas and references – A merged cell only holds one value, so formulas that expect a value in each cell of a range may behave oddly.
- Keyboard navigation – Arrow keys and Tab may skip merged cells, making data entry slower.
- Macros and VBA – Code that loops through rows often breaks when it encounters merged cells, because the merged cell’s address only covers the top-left corner.
If you only need the visual effect of a merged cell (like a header spanning multiple columns), consider using Center Across Selection instead, which keeps the cells intact but visually centers the content across them. To apply it, select the cells, right-click, choose Format Cells, go to the Alignment tab, and under Horizontal, select Center Across Selection. This avoids most problems because the cells remain separate.
How to Merge Cells Step by Step
Here are the exact steps for Microsoft 365 on Windows (Mac steps are similar):
- Open your Excel workbook and select the cells you want to merge. They must be adjacent (contiguous) – you can’t merge non-adjacent cells.
- Go to the Home tab on the ribbon.
- In the Alignment group, click the Merge & Center button (it looks like a small square with arrows pointing inward).
- If you want a different merge option, click the small arrow next to the button and choose Merge Across or Merge Cells.
- Excel will show a warning: “Merging cells only keeps the upper-left value and discards the other values.” Click OK to proceed.
On a Mac, the steps are identical – the button is in the same location on the Home tab. In Excel for the web, the button is also available under Home > Alignment, but the warning message may look slightly different.
Keyboard Shortcuts for Merging
There is no single default shortcut for merging, but you can use the Alt key sequence:
- Windows: Press
AltthenHthenMthenCto merge and center. (This works in Excel 2016 and later.) - Mac: There is no built-in shortcut, but you can add the Merge & Center command to the Quick Access Toolbar and then use
Option+ the number key that appears (e.g.,Option+1if it’s the first item).
If you merge frequently, add the Merge & Center button to your Quick Access Toolbar: right-click the button and choose Add to Quick Access Toolbar. Then you can press Alt + 1 (or the number that corresponds to its position) to trigger it.
Merged Cells vs. Center Across Selection
Many users wonder when to use merging versus Center Across Selection. Here’s a quick comparison:
- Merged cells – The cells become one physical cell. This is necessary if you need to apply a fill color to the entire area, or if you need the cell to be a single target for a formula or a hyperlink. However, it breaks sorting and filtering.
- Center Across Selection – The cells stay separate, but the text is centered across them. This is safer for data integrity and is often preferred for headers in tables that will be filtered or sorted.
For example, if you have a table with columns A, B, and C and you want a title over all three, using Merge & Center on A1:C1 makes it impossible to filter the table by column A later. Using Center Across Selection keeps A1, B1, and C1 distinct, so filtering works normally.
Common Problems and How to Fix Them
Here are typical issues users encounter and their solutions:
- “The selection contains multiple values. Merging into one cell keeps the upper-left value only.” – This is the standard warning. If you need to keep all values, consider using a formula like
=A1&" "&B1in a separate cell instead of merging. - Can’t sort because of merged cells – Unmerge all cells in the range first, then sort, then re-merge if necessary. Or use Center Across Selection to avoid the issue entirely.
- Copying a merged cell and pasting it elsewhere – The paste will create a merged cell of the same size. If you want to paste values only, right-click and choose Paste Special > Values.
- Merged cells in a table (Excel Table) – Excel Tables do not support merged cells. You’ll see an error if you try to merge inside a table. Convert the table to a range (Table Design > Tools > Convert to Range) if you must merge.
- Printing issues – Merged cells can cause page breaks to fall in odd places. Check Print Preview and adjust page breaks if needed.
Alternatives to Merging Cells
If merging causes too many headaches, here are alternatives that achieve similar visual results:
- Center Across Selection – As described above, this is the best alternative for headers.
- Use a single cell with text wrapping – Instead of merging multiple cells, put the text in one cell and enable Wrap Text (Home > Alignment > Wrap Text) to let it flow across multiple lines.
- Use a table with header rows – Excel Tables automatically format headers and allow sorting/filtering without merging.
- Use a PivotTable – For summarizing data, PivotTables give you clean, dynamic layouts without needing to merge cells.
Frequently Asked Questions
Can I merge cells without losing data?
No, merging always discards all values except the upper-left one. If you need to keep all data, combine the values using a formula in a separate cell first, for example =A1&" "&B1, then copy and paste as values before merging.
How do I merge cells in Excel on a Mac?
The steps are the same: select the cells, go to the Home tab, and click Merge & Center. The button is in the Alignment group. There is no keyboard shortcut by default, but you can add it to the Quick Access Toolbar for faster access.
Why is Merge & Center grayed out?
This happens when you’re editing a cell (press Enter to finish), or when the sheet is protected. If the sheet is protected, you need to unprotect it (Review > Unprotect Sheet) or have the protection settings allow formatting.
Can I merge cells in Excel for the web?
Yes, Excel for the web supports merging. Select the cells, go to Home > Alignment > Merge & Center. The same limitations apply, and you’ll see the warning about losing data.
Does merging affect formulas in other cells?
Merging itself doesn’t change formulas elsewhere, but if a formula references a cell that gets merged, it will still reference the top-left cell of the merged range. For example, if you merge B2:C2, a formula in D2 that referenced C2 will now reference the merged cell’s value (which is the value from B2).
How do I unmerge all cells in a worksheet quickly?
Select all cells by clicking the triangle at the top-left corner (between row numbers and column letters), then go to Home > Alignment > Merge & Center (or the dropdown and choose Unmerge Cells). This will unmerge every merged cell in the sheet.
Related
- F.08 Export to Excel: How to Do It
- Extracting Numbers from Text in Excel
- Export Import Excel Revit: How to Move Data Both Ways
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Remove Emails from the Archive Folder in OutlookTo remove an email from Outlook’s regular Archive folder, open Archive, select the message, and use Move to…
- Searchable Dropdown in Google Sheets: Setup and TipsYes. In Google Sheets in a web browser, you can search a dropdown’s options by opening the dropdown…
- Google Sheets Checkbox X Symbol: Show an X InsteadGoogle Sheets’ built-in checkbox cannot be changed to draw an X instead of its usual check mark. To…
- Excel Protect Sheet but Allow Copying: What to KnowYes. In Excel for Microsoft 365 on Windows, protect the sheet and leave the relevant cells selectable; users…
- Excel Yearly Budget Template: How to Build OneYes, you can build a yearly budget template in Excel in about 15 minutes using a simple layout:…
- Does Excel Have Find and Replace? How to Use ItYes. Microsoft Excel for Microsoft 365 on Windows has Find and Replace: press Ctrl+H, enter the text to…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.