JOIN and TEXTJOIN
JOIN(delimiter, value_or_array1, ...) concatenates all values in a range into one text with a separator between them, and TEXTJOIN(delimiter, ignore_empty, text1, ...) does the same but can skip empty cells. Both are the reverse of SPLIT and are the standard way to make a comma-separated list from a column.
Syntax
=JOIN(delimiter, value_or_array1, [value_or_array2, ...]) and =TEXTJOIN(delimiter, ignore_empty, text1, [text2, ...])| Part | What it is |
|---|---|
delimiter | The text placed between values, for example ", " or CHAR(10) for a line break. Can be empty. |
ignore_empty | TEXTJOIN only: TRUE skips blank cells, FALSE keeps a separator for each blank. |
value_or_array / text | Cells, ranges or strings to combine. |
Examples
=JOIN(", ", A2:A4)Result: Ana, Ben, Cho (when A2:A4 hold those names)
=TEXTJOIN(", ", TRUE, A2:A10)Result: The filled names only, blanks skipped
=TEXTJOIN(", ", TRUE, FILTER(A2:A10, B2:B10="Yes"))Result: Only the names whose column B says Yes, as one list
FILTER picks the rows, TEXTJOIN flattens them.
Common mistakes
- JOIN includes blanks, producing Ana, , Ben; switch to TEXTJOIN with TRUE as the second argument.
- Joining numbers or dates gives serial numbers like 46329; wrap them in TEXT with a format first.
- A result longer than 50,000 characters gives an error; join fewer rows.
Practice JOIN and TEXTJOIN
These drills check your answer on live data, free, no account needed.
- Join the confirmed namesList the names of everyone who confirmed ("Yes"), separated by a comma and a space, in E2. Use JOIN and FILTER.
Questions
How do I join cells with a line break?
Use CHAR(10) as the delimiter and turn on wrapping for the cell: =TEXTJOIN(CHAR(10), TRUE, A2:A10).
What is the difference between JOIN and TEXTJOIN?
TEXTJOIN can ignore empty cells and accepts both ranges and single values; JOIN always keeps blanks. For most lists TEXTJOIN with TRUE is the better choice.
Related
- SPLITHow SPLIT in Google Sheets breaks text into separate cells by a comma, space or other delimiter, how to keep only the first or last piece, and common errors.
- CONCATENATE and &How to combine cells in Google Sheets with CONCATENATE, CONCAT and the & operator, add spaces and separators, keep number and date formats, avoid mistakes.
- FILTERHow the FILTER function in Google Sheets returns only rows that match one or more conditions, with examples for AND, OR, dates and text, plus common errors.
- TEXTHow the TEXT function in Google Sheets turns a number or date into formatted text: month labels, currency, percentages and leading zeros, with common codes.
Previous: SPLITNext: REGEXMATCH, REGEXEXTRACT and REGEXREPLACE