How to use TEXTJOIN
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Combine a range of cells into one string with a separator — build lists, CSV lines, full sentences.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel (desktop) | =TEXTJOIN(", ",TRUE,A2:A6) | TEXTJOIN(delimiter, ignore empty?, range). Needs Excel 2016+; the & operator is the fallback. |
| Google Sheets | =TEXTJOIN(", ",TRUE,A2:A6) | Identical. |
| LibreOffice Calc | =TEXTJOIN(", ",TRUE,A2:A6) | Identical. |
How it works
TEXTJOIN glues together a whole range with a delimiter between each value: the first argument is the separator (", "), the second says whether to skip empty cells (TRUE, so gaps don't leave doubled commas), and the third is the range — giving "apple, banana, cherry". This is what CONCATENATE and the & operator can't do easily: they'd need you to type the separator between every cell. Use CHAR(10) as the delimiter for line breaks within a cell (turn on wrap text), or combine with UNIQUE to join a de-duplicated list. TEXTJOIN needs Excel 2016+ (it's in Google Sheets and LibreOffice); on older Excel, chain values with &.
Verified, not just documented
We ran =TEXTJOIN(", ",TRUE,A2:A4) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned apple, banana, cherry — 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 apple, banana, cherry 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.
Functions used
TEXTJOIN — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to concatenate cells that meet a condition (TEXTJOIN IF)
- How to extract numbers from text in a cell
- How to join a list of cells into one comma-separated string
- How to reverse a text string