No Google Sheets formula can merge cells in the spreadsheet layout. To combine the contents of cells in one result, use a formula such as =TEXTJOIN(" ", TRUE, A2:C2); to physically merge cells, select them and choose Format > Merge cells.
What “merge cells” means in Google Sheets
The phrase can mean two different things. A physical merge changes the sheet’s layout: several neighboring cells become one larger cell. Combining text, by contrast, puts values from multiple cells together in the result of a formula, while leaving the original cells separate. Sheets has a menu command for the first task and formulas for the second; they are not interchangeable.
This distinction matters because a formula calculates a value for its own cell. It cannot alter the grid structure, remove cell boundaries, or change the formatting of other cells. A formula can produce a string that looks like a single combined label, but that does not mean the cells containing the source values have been merged.
For example, if A2 contains “Mia” and B2 contains “Chen,” you can show “Mia Chen” in another cell. A2 and B2 remain separate, so they can still be sorted, edited, or used in other calculations. If you physically merge A2 and B2, only the upper-left cell’s content is retained; the other cell’s content is removed. Make a copy or combine the values first if you need to keep them.
Combine cell contents with a formula
Use TEXTJOIN when you want to combine a range and choose a separator. It can also skip blank cells, which is useful when some records have missing middle names, apartment numbers, or other optional details.
With a first name in A2, a middle name in B2, and a surname in C2, enter this in D2 to combine the parts with spaces and ignore blank cells:
=TEXTJOIN(" ", TRUE, A2:C2)
If A2 is “Mia,” B2 is blank, and C2 is “Chen,” the result is “Mia Chen”—there is one space between the names, not an extra space for the empty cell. The first argument is the delimiter; the second tells the function to ignore empty cells; the final argument is the range to join.
For a fixed number of cells, the ampersand operator is a compact option. With a street name in A2 and a street number in B2, this formula in C2 joins them with one space:
=B2&" "&A2
If B2 is “14” and A2 is “Oak Street,” the result is “14 Oak Street.” The formula does not change either source cell. You can also join values without a separator using =A2&B2, though that may produce an unclear result such as “MiaChen.” Put a literal separator in quotation marks when the combined value needs spaces, commas, or punctuation.
When the same separator is needed between every item in a range, TEXTJOIN is usually easier to maintain than a long chain of ampersands. For a comma-separated list from A2 through A5, enter this in B2:
=TEXTJOIN(", ", TRUE, A2:A5)
If the range contains “Apples,” a blank cell, “Pears,” and “Plums,” the result is “Apples, Pears, Plums.” If you set the second argument to FALSE, empty cells are not skipped and their positions can create repeated delimiters. Choose the behavior that fits your data.
Use a formula for a combined label or address
A formula is especially handy when you want a display field built from structured data. Suppose A2 contains a city, B2 a state abbreviation, and C2 a postal code. In D2, a formula can create a location label that updates whenever the source cells change:
=A2&", "&B2&" "&C2
With “Portland” in A2, “OR” in B2, and “97205” in C2, the result is “Portland, OR 97205.” This approach keeps each data field available on its own for filtering, validation, or reporting. The combined label is a view of those fields, not a replacement for them.
For a whole column of records, put a row formula in the first result row and fill it down. In Google Sheets, drag the small square at the lower-right corner of the selected cell, or copy and paste the formula into the rows below. Relative references normally adjust as the formula moves: A2 becomes A3, for instance. If you want to join a range on each row, use a row-specific range such as A2:C2, then fill down.
Formula results update when their referenced values change. If you need a fixed, non-updating result instead, copy the formula output and use Edit > Paste special > Values only. This replaces the formulas in the destination with their current displayed values. Keep the source columns until you have confirmed that the pasted results are complete.
Physically merge cells using the menu
For a heading that should span several columns, use the Sheets menu rather than a formula. Select the adjacent cells you want to merge, then choose Format > Merge cells > Merge all. The selection becomes a single cell area. The available choices can include merging all selected cells, merging horizontally, merging vertically, or unmerging, depending on the selection.
Before merging, check whether more than the upper-left cell contains data. A physical merge keeps the value in the upper-left cell of the selected range and removes values in the other cells. It does not concatenate or preserve all the contents automatically. If several cells contain information you need, first combine that information with a formula in a separate cell, check the result, and only then decide whether the layout should be merged.
To reverse a merge, select the merged area and choose Format > Merge cells > Unmerge. Unmerging restores the separate cell areas, but it does not bring back values discarded when the cells were first merged. Undo may help immediately after an accidental merge, but do not rely on it as a substitute for preserving the original data.
When to use a merge and when not to
Physical merges are best used sparingly for visual organization, such as a report title across several columns. They can make a heading look centered over a table, but they are often awkward in the body of a data table. A merged area spans multiple grid positions while behaving as one cell, which can complicate selecting, sorting, filtering, pasting, and working with ranges.
For a dataset, keep one value per cell and use a formula in a new column when you need a combined display. For a report heading, a merge may be reasonable if the selected cells are empty except for the heading’s upper-left cell. If you only want text to appear centered visually, consider horizontal alignment options before merging; that can preserve the underlying grid. The exact visual result depends on the selected cells and formatting.
- Choose a formula when the contents must be combined, should update when source data changes, or need to remain available as separate fields.
- Choose Merge cells when the goal is a visual layout change, such as a title spanning columns, and no important values will be lost.
- Keep cells separate when the range is part of a sortable or filterable dataset, or when other people or tools need to work with the rows consistently.
Common formula and merge problems
The formula shows an error: Check that cell references are spelled correctly and that quotation marks around separators are straight double quotes. In Sheets, a formula begins with an equals sign. If you are combining several fields, verify that each cell reference and separator is connected with an ampersand, or use the correct TEXTJOIN arguments.
The output has missing spaces or punctuation: Formulas do not add visual separators automatically. Include the desired character in a quoted string, as in " " for a space or ", " for a comma and a space. If you use TEXTJOIN, its first argument supplies the separator between values. Review the result with blank source cells, because the choice to ignore blanks changes where separators appear.
A merge removed content: That is expected behavior for a physical merge: Sheets retains only the upper-left value in the selection. Use Undo immediately if appropriate, or restore from a copy or version history if the lost information matters. A formula in a separate cell can combine values before you merge, but it cannot make the merge itself preserve all source values.
The formula is visible instead of its result: Check whether the cell is formatted as plain text or whether the formula was entered with an apostrophe before the equals sign. Change the format if needed, then re-enter the formula. Also make sure the cell does not contain a leading space before the equals sign.
Alternatives for cleaner spreadsheet layouts
If your main goal is a heading across a table, put the heading in one cell and use alignment and formatting rather than merging the full data range. Bold text, a background color, borders, and adjusted column widths can distinguish a title while leaving the table’s rows and columns intact. A single-cell heading is also easier to reference and select.
If you need a combined value for export or a report, create a helper column with a formula and keep the original fields. This makes the result auditable: someone can see whether a name, address, or label was assembled from the intended source cells. If the exported file requires fixed text, copy the results and paste values only after checking them.
Google Sheets also offers Apps Script for automation, including scripts that can change spreadsheet formatting or merge ranges. That is a separate tool, not a cell formula, and it is generally unnecessary for a one-time merge. For recurring automation, scripts should be written and reviewed carefully because they can alter many cells at once.
Frequently Asked Questions
Can a Google Sheets formula merge cells?
No. Formulas return values; they cannot change the sheet’s structure. Use Format > Merge cells for a physical merge, or use TEXTJOIN or & to combine cell contents in a formula result.
What formula combines text from multiple cells?
Use TEXTJOIN when you want a chosen separator and optional handling of blanks. For a small fixed set of cells, connect references with & and put spaces or punctuation in quotation marks.
Does merging cells keep all their values?
No. A merge keeps the content in the upper-left cell of the selected range and removes the contents of the other cells. Combine or copy anything important before merging.
Can I combine cells and keep the original data?
Yes. Put a joining formula in a different, empty cell or column. The source cells remain separate and unchanged, and the formula result updates when those source values change.
How do I unmerge cells in Google Sheets?
Select the merged area and choose Format > Merge cells > Unmerge. Unmerging restores separate cells but does not restore values that were discarded during the merge.
Is merging cells the same in Excel?
The basic distinction is similar: spreadsheet formulas combine values, while a merge command changes layout. Excel has its own ribbon command for merging, and menu or ribbon paths differ from Google Sheets; a Sheets formula still cannot perform a physical merge.
Related
- Signature Line in Word Without the X Placeholder Symbol
- Insert a Square Checkbox in Word: Symbol or Clickable Box
- Insert a Personal Signature in Word for Mac: Steps & Tips
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Add Values to a Dropdown List: Easy MethodsTo add a value to an Excel dropdown, edit the list named in its Data Validation settings or…
- Remove an Extra Page After a Section Break in WordTo remove an extra page after a section break in Word, show formatting marks with Ctrl+Shift+8 on Windows…
- How to Create and Print Number Labels in Microsoft WordTo create sequential number labels in Microsoft Word, put one number per row in an Excel list, then…
- PowerPoint Speaker Notes: Where to Add and View ThemAdd speaker notes in the Notes pane beneath the slide: in PowerPoint for Microsoft 365 on Windows, open…
- Add a Drop-Down List in Excel: Setup, Tips, and FixesTo add a drop-down list in Excel for Microsoft 365 on Windows, select the cells, choose Data >…
- How to Share a Group Calendar in Outlook 365 With MembersTo share a Microsoft 365 group calendar in Outlook, add the people who need access as members of…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.