Quick Answer & Formula
Excel
Sheets
Beginner
=TEXTJOIN(delimiter, ignore_empty, text1, [text2, ...]) TEXTJOIN joins multiple strings or cell ranges together using a delimiter, with an option to ignore blanks: =TEXTJOIN(", ", TRUE, A2:A10).
TEXTJOIN Function in Excel & Google Sheets
The TEXTJOIN function joins entire ranges of text using a specified separator, eliminating the need to type & ", " & dozens of times.
1. Merging a Range into a Comma-Separated List
=TEXTJOIN(", ", TRUE, A2:A10)
- Output:
"Apple, Banana, Orange, Grape, Pineapple"
2. Combining Address Fields into a Mailing Label
If A2 is Street, B2 is Apt/Suite, C2 is City, D2 is State, E2 is Zip:
=TEXTJOIN(", ", TRUE, A2:E2)
- If
B2(Apt/Suite) is blank,TRUEensures no awkward double commas (", ,") appear.
3. Combining Filtered Results (e.g. List all active project members)
=TEXTJOIN(", ", TRUE, FILTER(A2:A50, B2:B50 = "Active Project"))
?
Frequently Asked Questions
How do I combine cells separated by a new line (line break)?
Use CHAR(10) in Windows Excel or Google Sheets (or CHAR(13) on Mac): =TEXTJOIN(CHAR(10), TRUE, A2:A5), and enable 'Wrap Text' on the cell.