What merging a cell does

Merging cells combines two or more adjacent cells into one larger cell. When you merge cells, the spreadsheet treats them as a single unit. The merged cell spans across the rows or columns you selected, and any text or data you enter appears in the middle of that larger space.

Merging is purely visual — it changes how the cell looks and behaves, not how your data is stored. It is useful when you want a title to stretch across multiple columns, or when you are creating a form or report layout that needs wider spaces for labels. It does not change the underlying calculation or data structure of your spreadsheet.

Key Takeaways

  • Merging combines adjacent cells into one larger cell, useful for titles and labels that span multiple columns.
  • Most spreadsheet programs merge cells through a menu option after you select the cells you want to combine.
  • Merged cells can cause problems with sorting and filtering, so avoid merging in data tables where you plan to reorganize rows.
  • If you merge cells that contain data, most programs keep only the top-left cell's content and discard the rest.
  • You can unmerge cells at any time to return them to separate, independent cells.

How to merge cells in Google Sheets

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 you need. For example, to create a title that spans columns A through D in row 1, click on cell A1 and drag to D1.

Once the cells are selected, go to the Format menu at the top. Click Merge cells, then choose your merge option. Google Sheets offers three choices: merge all (combines all selected cells into one), merge horizontally (merges cells in the same row), or merge vertically (merges cells in the same column). Select the option that matches what you need.

Google Sheets will combine the cells when ready. If the cells contained text, only the content from the top-left cell will remain. The merged cell is now ready for you to type a title, label, or other content.

How to merge cells in Microsoft Excel

Select the cells you want to merge by clicking on the first cell and dragging to the last one. You can also click the first cell, hold Shift, and click the last cell to select the range.

On the Home tab in the ribbon at the top, look for the Merge & Center button. Click the small arrow next to it to see your options: merge and center, merge across, or merge cells. Choose the option you need. Merge and center is the most common choice — it combines the cells and centers the text. Merge across merges cells in the same row without centering. Merge cells combines them without any automatic formatting.

Excel will warn you if the selected cells contain data other than the top-left cell. Click OK to proceed, and Excel will keep only the top-left content and discard the rest.

How to merge cells in LibreOffice Calc

Select the range of cells you want to merge. Go to the Format menu and click Merge Cells. A dialog box will appear with options: you can choose to merge cells, keep the content, or merge and center content.

LibreOffice will ask what to do with content in the non-top-left cells. Select your preference and click OK. The cells will merge into a single unit. You can now type or edit content in the merged cell as you would in any other cell.

When merging causes problems

Merged cells can interfere with sorting and filtering. If you have a data table where you plan to rearrange rows by sorting, avoid merging cells in that table. Sorting works best when each column contains independent cells. A merged cell can break the sort or produce unexpected results.

Merged cells also complicate copying and pasting. If you copy a merged cell and paste it elsewhere, the result depends on your program and settings — sometimes you get a merged cell, sometimes you get separate cells with only the top-left content. This unpredictability makes merged cells risky in templates or spreadsheets other people will edit.

If you are building a spreadsheet that will be shared, converted to another format, or imported into a database, keep merged cells out of your data area. Use them only for headers, titles, and layout elements that sit outside your actual data.

How to unmerge cells

Select the merged cell you want to unmerge. In Google Sheets, go to Format > Merge cells > Unmerge. In Excel, go to Home > Merge & Center (arrow) > Unmerge Cells. In LibreOffice Calc, go to Format > Merge Cells > Unmerge.

The cells will separate back into individual cells. The content that was in the merged cell will remain in the top-left cell of the range. The other cells in the range will be empty.

Alternatives to merging for layout and design

If you need a title or label to span multiple columns but want to avoid the problems merged cells create, use a single cell with a wider column width instead. Widen the column to the size you need, and the text will sit in one cell without merging. This keeps your data structure clean and avoids sorting issues.

For forms or reports, you can also use borders and background colors to create visual sections without merging. Select a range of cells, explore a background color or border, and type your content in the top-left cell. The visual effect is similar, but the cells remain independent and functional.

Frequently Asked Questions

What happens to data in cells I merge?

Most spreadsheet programs keep only the content from the top-left cell and discard content from the other cells in the merge range. Before you merge, check what is in each cell. If you need to save data from other cells, copy it elsewhere first.

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

No. You can only merge adjacent cells — cells that touch each other in a row or column. If you need to combine non-adjacent cells visually, use borders and background colors instead.

Will merging cells affect my formulas?

Merging does not change how formulas work. If a formula refers to a cell you then merge, the formula still works. However, if a formula refers to one of the non-top-left cells in a merge range, it may behave unexpectedly after the merge.

Can I merge cells in a pivot table?

No. Pivot tables do not support merged cells. If you need to merge cells, do it in a regular data range or in a separate area of your spreadsheet outside the pivot table.

How do I center text in a merged cell?

In Google Sheets and Excel, the merge and center option centers text automatically. If you used a different merge option, select the merged cell, then use the alignment buttons in the toolbar to center the text horizontally and vertically.