What merging cells does and when you need it

Merging cells combines two or more adjacent cells into a single larger cell. When you merge cells, the spreadsheet treats them as one unit — you can type text that spans across what used to be separate columns, and that text sits centered in the merged space. The most common reason to merge is to create a title or header that stretches across multiple columns, or to label a section of your data that spans several rows.

Merging is purely visual. It does not change how your data works or how formulas calculate. If you merge cells that contain numbers and then try to use those cells in a calculation, the spreadsheet will only read the value in the top-left cell of the merged group. This is why most people merge empty cells or cells that hold only labels, not data you plan to use in formulas.

Key Takeaways

  • Merging combines adjacent cells into one larger cell, useful for titles and labels that span multiple columns or rows.
  • In Excel, select the cells you want to merge, then use the Merge & Center button in the Home tab or right-click and choose Format Cells.
  • In Google Sheets, select your cells and click Format, then Merge Cells, then choose whether to merge all cells or keep them separate.
  • Merged cells can cause problems with sorting and filtering, so merge only the cells you truly need and avoid merging data you plan to calculate with.
  • You can unmerge cells at any time by selecting the merged cell and using the unmerge option in the same menu where you merged them.

How to merge cells in Excel

Open your spreadsheet and select the cells you want to merge. Click and drag from the first cell to the last cell in the range. For example, if you want to merge cells A1 through D1 to create a title that stretches across four columns, click on A1 and drag to D1.

Once your cells are selected, go to the Home tab at the top of the screen. Look for the Merge & Center button in the Alignment group — it shows a small icon with cells joining together. Click the dropdown arrow next to it. You will see three options: Merge & Center, Merge Across, and Merge Cells. Choose Merge & Center if you want the text centered in the merged cell, Merge Across if you want it left-aligned, or Merge Cells if you are merging rows vertically. The cells will combine when ready.

If you cannot find the Merge & Center button, right-click on your selected cells instead. Click Format Cells at the bottom of the menu. In the window that opens, go to the Alignment tab and check the box that says Merge Cells. Click OK. The cells will merge using the alignment settings you have already chosen.

How to merge cells in Google Sheets

Select the cells you want to merge by clicking and dragging across them. If you want to merge A1 through D1, click on A1 and drag to D1. You can also select non-adjacent cells by holding Ctrl (or Cmd on Mac) and clicking each cell, though most merges work on adjacent cells in a row or column.

Click the Format menu at the top. Scroll down and click Merge Cells. A submenu will appear with four options. Click Merge All if you want to combine all your selected cells into one. Click Merge Horizontally if you are merging cells across a row and want to keep each row separate. Click Merge Vertically if you are merging cells down a column and want to keep each column separate. For most title rows, choose Merge All.

Google Sheets will combine your cells and center the text by default. If you want to change the alignment, select the merged cell, then use the alignment buttons in the toolbar at the top — they look like lines aligned left, center, or right.

Merging cells in other spreadsheet programs

LibreOffice Calc, which is free and works similarly to Excel, uses the same process: select your cells, then go to Format in the menu bar and click Merge Cells. A dialog box will ask how you want to merge. Choose your option and click OK.

Apple Numbers, which comes with Mac computers, handles merging differently. Select your cells, then right-click and choose Table in the menu. Look for an option called Merge Cells or Combine Cells. Numbers will combine them, though the process varies slightly depending on your version.

Most online spreadsheet tools follow Google Sheets' approach: select cells, then use a Format or Merge option in the menu. If you are unsure, look for a Format menu or right-click on your selection — the merge option is usually nearby.

Problems merging cells can cause and how to avoid them

Merged cells can interfere with sorting and filtering. If you have a merged header row and try to sort your data, the spreadsheet may not recognize the columns correctly. To avoid this, merge only the cells in your header or title area, not in the rows that contain your actual data. Keep your data rows unmerged so sorting and filtering work properly.

If you merge cells that contain different values, the spreadsheet keeps only the value from the top-left cell and discards the others. For example, if you merge A1 (which contains 5) and B1 (which contains 10), the merged cell will show only 5, and 10 will be lost. Always check that merged cells contain the same value or that you do not need the other values before you merge.

Merged cells can also make your spreadsheet harder to edit later. If someone else opens your file and does not realize cells are merged, they may try to edit or delete what they think is a single cell and accidentally affect multiple columns or rows. Use merging sparingly and only when it genuinely improves readability.

How to unmerge cells

If you need to separate merged cells, select the merged cell by clicking on it once. In Excel, go to the Home tab, click the Merge & Center dropdown, and select Unmerge Cells. In Google Sheets, click Format, then Merge Cells, then Unmerge. The cells will separate and return to their original state.

When you unmerge, the text that was in the merged cell stays in the top-left cell of the group. Any text that was in the other cells before the merge is gone — it was discarded when you first merged. If you need that text back, you will have to type it again.

When to use merging and when to avoid it

Merging works well for titles, section headers, and labels that do not contain data you need to calculate with. A merged cell across the top of your spreadsheet that says "Sales Report — Q1 2024" is a good use of merging. A merged cell in your data rows that combines customer names or amounts is not.

If your spreadsheet is straightforward and you are the only person using it, merging is less risky. If you are sharing the file with others or plan to import the data into another program, avoid merging data cells. Stick to merging in header rows and title areas where the merged cells contain only labels.

A common alternative to merging is straightforward making a column wider and centering the text in it. This gives you the visual effect of a spanning header without the technical problems merging can create. If you are unsure whether to merge, try centering text in a wide cell first — it often solves the problem without the complications.

Frequently Asked Questions

Can I merge cells that are not next to each other?

No. You can only merge cells that are adjacent — next to each other in a row, column, or rectangle. If you select cells that are separated by other cells, the merge option will be grayed out or will not work. Select a continuous block of cells instead.

What happens to my data when I merge cells?

The spreadsheet keeps the value from the top-left cell and deletes the values in all other cells in the merged group. If you merge A1 (containing "John") and B1 (containing "Smith"), only "John" will remain. Always check your data before merging.

Can I merge cells in a formula?

You can reference a merged cell in a formula, but the formula will only read the value in the top-left cell of the merged group. It is better to avoid merging cells that contain numbers or data you plan to use in calculations. Merge only labels and headers instead.

Why does my sort or filter not work after merging?

Merged cells in your data rows can confuse the sort and filter functions because the spreadsheet cannot tell where one column ends and another begins. Keep your data rows unmerged and merge only in header or title rows above your data.

Can I merge cells in a pivot table?

Most spreadsheet programs do not let you merge cells in a pivot table because pivot tables are designed to reorganize automatically when your data changes. If you need a merged header, create it in a separate row above the pivot table instead.