← All how-to recipes

How to join a list of cells into one comma-separated string

✓ Verified in LibreOffice 25.8.7.3

Combine a column of values into a single cell separated by commas, skipping blanks.

The formula

AppFormulaNotes
Excel=TEXTJOIN(", ",TRUE,A2:A4)Excel 2019+/365.
Google Sheets=TEXTJOIN(", ",TRUE,A2:A4)Native.
LibreOffice Calc=TEXTJOIN(", ",TRUE(),A2:A4)Supported; LibreOffice wants TRUE() as a function.

How it works

TEXTJOIN(delimiter, ignore_empty, range) glues the values together with your chosen delimiter. The second argument TRUE skips empty cells so you never get doubled-up separators.

Verified, not just documented

We ran =TEXTJOIN(", ",TRUE(),A2:A4) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned red, green, blue — exactly the expected result. Every formula here is confirmed by actually executing it.