To merge cells in Google Sheets in a web browser, select the adjacent cells, then choose Format > Merge cells and pick Merge all, Merge horizontally, or Merge vertically. You can also use the Merge cells button on the toolbar; check the selected range first, because merging can discard values outside its upper-left cell.
What merging cells does
Merging combines two or more neighboring cells into one larger cell. The result is useful when a label or heading needs to span several columns or rows, such as a report title above a group of monthly figures. The grid still shows the underlying row and column structure, but the selected cells behave as a single cell for display and entry.
Merging is a layout change, not a way to join the contents of several cells. If A1 contains January and B1 contains February, merging A1:B1 does not put both words together. In a merged group, Google Sheets keeps the value from the upper-left cell and removes the other values in that group. If those values matter, combine or copy them somewhere safe before merging.
There are three merge choices because a rectangular selection can be combined in different directions. The choice affects how much of the selection becomes one cell, so it is worth distinguishing them before applying the command.
How to merge cells in a browser
- Open the spreadsheet in Google Sheets and select the cells you want to merge. Drag across the grid, or select the first cell, hold Shift, and select the last cell in the range. The cells must be adjacent and form a rectangle.
- Open Format in the menu bar, point to Merge cells, and choose the merge option that fits the selection. Alternatively, select the Merge cells toolbar button and choose an option from its menu.
- Review the result. If the selected cells contain more than one value, read any warning Sheets displays before confirming. The merge keeps only the upper-left value for each merged group.
- Adjust alignment, text wrapping, or column width if needed. Merging changes the cell area, but it does not automatically make the text centered or style it as a heading.
For example, to make a title span columns A through D, select A1:D1 and choose Merge all. To make a heading span A1:C1 and another span A2:C2, select A1:C2 and choose Merge horizontally. That option creates a separate merged cell in each row rather than one large merged block.
Which merge option should you choose?
- Merge all: Combines the entire selected rectangle into one cell. Choose it for a single title across a set of columns or for one label spanning both rows and columns. Only the value in the selection’s top-left cell is retained.
- Merge horizontally: Merges cells across each row of the selection, separately. If you select A1:D3, Sheets makes one merged cell for A1:D1, one for A2:D2, and one for A3:D3. Each row’s leftmost value is retained.
- Merge vertically: Merges cells down each column, separately. For A1:C3, Sheets makes a merged group in column A, another in B, and another in C. Each column’s top value is retained.
Think through the shape of the final layout before choosing. If a spreadsheet has a two-row header where each column needs its own label spanning both header rows, vertical merging may suit the design. If each row needs a section label across multiple columns, horizontal merging may be the better fit. If you intended one continuous title area, use Merge all instead.
Protect data before merging
The main risk is losing content, not damaging the spreadsheet file. Only one value can remain in a merged cell, so treat a merge as a destructive edit whenever other selected cells are populated. For a small range, copy the values to an unused area or a duplicate sheet before proceeding. For a larger range, inspect it systematically rather than assuming the blank-looking cells have no content; a cell may contain a formula or whitespace that is not obvious at a glance.
If you actually want to combine text from several cells, use a formula or edit the contents first, then merge only if the layout calls for it. For instance, if first and last names are in neighboring cells, merging them is not a substitute for joining the names into one text value. A formula can create the combined text in a separate cell, where you can review and preserve it before changing the layout.
Also consider whether the range is part of a data table. A clean rectangular dataset normally has one header per column and consistent rows. Merging cells inside that structure can make it harder for people to sort, filter, select, or reuse the data. Keep merges in presentation areas, such as a report title or a clearly separated section heading, rather than in the body of a list you expect to analyze.
Formatting a merged cell
Merging does not apply a particular visual style. After merging, use the toolbar controls or the Format menu to set horizontal and vertical alignment, text wrapping, font, fill color, borders, and number formatting as appropriate. For a report heading, center alignment and a fill color may make the span obvious, but keep enough contrast for the text to remain readable.
A merged cell can display text that is longer than the width of one column, but the result depends on the available space, wrapping, and row height. If the text appears clipped, try wrapping it, increasing the row height, or widening the relevant columns. Avoid solving every display problem with a merge: adjusting column widths or using text wrapping may preserve a more usable grid.
For a document that many people will edit, keep labels understandable without relying only on color or visual position. Merged layouts can make keyboard navigation and interpretation less straightforward, especially in a sheet that is also intended to function as a data table. A plain, unmerged header row is often easier to maintain and reuse.
How to unmerge cells
To reverse a merge, select the merged cell or merged range, then choose Format > Merge cells > Unmerge. You can also open the toolbar’s Merge cells menu and select the unmerge option. The original grid cells return, but unmerging does not restore values that were removed from the non-upper-left cells when the merge was made.
If you have just merged the wrong range, use Edit > Undo or press Ctrl+Z on Windows or Chromebook. On a Mac, press Command+Z. Undo is the most useful immediate fix because it can reverse the merge and restore the previous state while it remains in the edit history. If you have continued editing, undoing may also reverse later actions, so check the sheet as you step back.
Common problems and how to fix them
- The merge option is unavailable or does not work as expected: Confirm that you selected a rectangular range of neighboring cells rather than separate, nonadjacent cells. If the range is protected or you lack editing permission, you may also be unable to change it.
- Some values disappeared: Merging retains only the upper-left value of each group. Undo immediately if possible. If the merge has already been followed by other edits, check version history or a backup; do not assume unmerge can recover discarded values.
- The wrong parts merged: Undo, reselect the exact range, and choose the intended direction. For example, Merge all creates one cell from the entire selection, whereas Merge horizontally makes one cell per row.
- The text is not centered: Alignment is separate from merging. Select the merged cell and change horizontal or vertical alignment using the toolbar.
- Sorting or filtering becomes awkward: Review whether the merged cells are inside the data range. Unmerge cells in the dataset and use a conventional header row and consistent records if the sheet needs to be sorted or filtered reliably.
When a sheet is shared, make a copy before a major layout change if you are unsure how it affects other users’ work. Sheets’ version history can help you review earlier edits, but a saved copy is a straightforward safeguard for important information.
Alternatives to merging
Often the goal is to make a heading look centered across columns, not to create a true merged cell. Google Sheets does not provide Excel’s exact Center Across Selection command, so consider simpler layout options: place a heading in one cell, widen the first column if appropriate, wrap the text, or center the text within a single cell. These choices keep neighboring cells independent.
For structured information, use a separate title row above the dataset and leave the table’s column headings unmerged. For a section label, you can put the label in the first column and use formatting or borders to distinguish the section without combining cells. These approaches make it easier to add records, apply filters, and copy the data into another tool.
If the sole requirement is a large, centered label for a print-ready report, merging may still be the clearest option. The useful question is whether the range is mainly for presentation or whether it needs to behave like ordinary tabular data. Choosing based on that purpose avoids many later sorting and editing frustrations.
Google Sheets and Excel differences
The basic idea is similar in Google Sheets and Microsoft Excel: select a range and use a merge command, while remembering that other cell contents may be discarded. The menu path differs. In Excel for Microsoft 365 on Windows, the merge controls are on Home > Merge & Center; the dropdown provides merge choices. In Google Sheets, use Format > Merge cells or the toolbar menu. Do not follow Excel ribbon instructions when working in the Sheets browser interface.
Excel also offers Center Across Selection as an alignment option, which centers a label across selected cells without merging them. Google Sheets does not have that same Excel command. In either program, keep cells unmerged when the range needs to remain a regular sortable data table.
Frequently Asked Questions
Can I merge cells in Google Sheets without losing data?
Not by merging alone if multiple cells contain values: only the upper-left value in each merged group is kept. Copy or combine the information elsewhere first, then merge the cells if you still need the layout.
Can I merge cells on the Google Sheets mobile app?
This guide covers Sheets in a web browser. The mobile app has a different interface, so the browser menu steps do not map exactly to its controls. If you are following the steps above, open the file in Sheets on a computer browser and use Format > Merge cells.
How do I merge cells across each row?
Select the full rectangular range, then choose Format > Merge cells > Merge horizontally. Sheets merges each row separately, keeping that row’s leftmost value in its resulting cell.
How do I merge cells vertically?
Select the rectangular range and choose Format > Merge cells > Merge vertically. Each column is merged separately, and the top value in each column’s group is retained.
Can I undo a merge or get the removed values back?
Use Edit > Undo, or Ctrl+Z on Windows and Command+Z on Mac, soon after merging to reverse the action. Unmerge restores the grid but does not by itself restore values that were discarded, so use undo, a copy, or version history when you need to recover them.
Related
- Compound Interest Spreadsheet: Build One in Excel Easily
- Power Query: Select Columns and Keep the Fields You Need
- Google Sheets Data Cleaning: Tools, Steps, and Tips
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Flowchart in Word: The Easiest Way to Make OneThe easiest reliable way to make a flowchart in Word is to use built-in shapes: choose Insert >…
- Shortcut Key to Insert a Checkbox in Microsoft WordIn Word for Microsoft 365 on Windows, type 2610 and press Alt+X to insert an empty checkbox symbol…
- How to Add an MLA Header in Word (Step by Step)To add an MLA header in Word, insert an automatic page number at the top right of the…
- How to Freeze a Reference in Excel with Dollar SignsTo freeze a cell reference in an Excel formula, add dollar signs to the cell address—for example, change…
- Creating Columns in Word: Layout, Breaks, and FixesTo create columns in Microsoft Word for Microsoft 365 on Windows, select the text you want to format,…
- How to Make Columns Longer in Word Without Changing LayoutTo make columns in Word extend farther down a page, increase the usable page height by reducing the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.