Merging Cells in Excel and Google Sheets

Both spreadsheets function in similar ways, with just a few key differences

Digital Spreadsheet on tablet and phone
John Lamb / Getty Images

In Microsoft Excel and Google Sheets, a merged cell is a single cell created by combining or merging two or more individual cells. Both spreadsheets merge cells horizontally, vertically or both.

This procedure works in the current release of Google Sheets and in all versions of Microsoft Excel since Excel 2010.

How to Merge Cells in Microsoft Excel

Microsoft Excel with the Merge & Center button selected

Excel offers one-click access to the cell-merge tool. Simply highlight the cells that should be merged — they must be contiguous either horizontally or vertically — then click the Merge & Center button in the Alignment section of the Home tab.

By default, clicking the button will merge the selected cells and center the content in the top-left cell across the merge. To change this behavior, click the down-arrow next to the button and select an alternative behavior instead:

  • Merge & Center: Default behavior; merges the cells then centers whatever content appeared in the right-most or top-most cell of the region.
  • Merge Across: Merges the cells, but does not center the content across them. Only works on a row level. For example, if you've selected a block of four rows by four columns, this option results in four one-column rows.
  • Merge Cells: Merges the cells into one large block. For example, if you've selected a block of four rows by four columns, this option results in a single block that's four rows high by four rows wide.
  • Unmerge Cells: When you've selected a merged cell, using this option unmerges the cells.

Although the Merge & Center function is most often used to consolidate row-level headers in reports, you're free to merge cells vertically, too — or even in rectangles. You cannot, however, merge non-contiguous cells.

How to Merge Cells In Google Sheets

Merge button activated in Google Sheets

As with Microsoft Excel, Google Sheets also offers one-button access to its merge feature. Highlight the cells to be merged and click the merge icon in the toolbar — it looks like a square with arrows pointed inward.

The default behavior is to merge all the cells, but clicking the down arrow next to the icon reveals additional merge types:

  • Merge All: Default behavior. Renders all the cells into a single block, regardless of how many rows and columns are within the range.
  • Merge Horizontally: Merges the cells along the row axis. If you've selected more than one row, this option results in each row standing alone with the columns merged into one or more single-row cells.
  • Merge Vertically: Merges the cells along the column axis. For example, if you select a six-row-by-six-column range, this option renders six merged cells, each of which is one column wide by six rows tall.
  • Unmerge: Removes a merge on the affected cells.

Merges in Google Sheets preserve only the contents of the top-left cell within the merged range. You can only merge cells in contiguous blocks.

If you lose data in a merge, use the undo feature in Microsoft Excel or Google Sheets. However, if you can't undo, un-merging the cells won't restore the data, because the data is discarded as part of the merge procedure.