← All how-to recipes

How to combine two or more cells into one

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Merge the contents of several cells into a single cell — join names, addresses, or codes.

The formula

AppFormulaNotes
Excel (desktop)=A2&" "&B2The & operator joins text. Put separators (spaces, commas) in quotes between the cells.
Google Sheets=A2&" "&B2Identical.
LibreOffice Calc=A2&" "&B2Identical.

How it works

The ampersand & is the simplest way to combine cells: put it between the cells and add any separator you want in quotes — " " for a space gives "Ada Lovelace", ", " for a comma-space, "" for none. It's shorter and clearer than the CONCATENATE function, which does the same thing. Two related tools: CONCAT joins a whole range with no separator, and TEXTJOIN adds a separator between every value in a range and can skip blanks (=TEXTJOIN(", ",TRUE,A2:A10)) — far easier than typing & between dozens of cells. Note that 'merge cells' in the toolbar is a different thing (it visually merges cells and usually causes headaches); a formula is almost always the better choice.

Verified, not just documented

We ran =A2&" "&B2 in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned Ada Lovelace — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned Ada Lovelace for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.