How to Use the TEXTJOIN Function in Google Sheets | Join Multiple Cells with a Delimiter
How to Use the TEXTJOIN Function
The TEXTJOIN function combines multiple text strings or cell ranges into a single string using a specified delimiter. Because it can automatically skip blank cells, it is very convenient for merging list data.
Syntax
=TEXTJOIN(delimiter, ignore_empty, text1, [text2, ...])
- delimiter: The string to insert between each text item, such as
", "or"-"(required). Specify an empty string""to join with no separator. - ignore_empty: Specify
TRUEto ignore blank cells in the range, orFALSEto include blank cells with delimiters (required). - text1: The first text string, cell reference, or cell range (e.g.,
A2:A5) to join (required). - text2, …: Additional strings or ranges to join, separated by commas (optional).
Example Using a Table
Here is an example of creating a comma-separated string from the assignee list below while excluding blank rows.
| Row | Column A (Assignee) |
|---|---|
| 1 | Assignee |
| 2 | Sato |
| 3 | (Blank) |
| 4 | Suzuki |
| 5 | Takahashi |
- Formula:
=TEXTJOIN(", ", TRUE, A2:A5) - Result:
Sato, Suzuki, Takahashi
Changing the second argument to FALSE includes the blank cell, resulting in Sato, , Suzuki, Takahashi.
Common Errors and Notes
- 50,000-Character Cell Limit (
#VALUE!Error): Google Sheets has a maximum limit of 50,000 characters per cell. If the combined result exceeds this limit, a#VALUE!error occurs. - Cells Containing Only Spaces Are Not Treated as Blank: Cells that look empty but contain half-width or full-width spaces are not ignored and will insert extra delimiters. Using
TRIMbeforehand helps prevent this. - Number and Date Formatting Is Lost: Joining cells with currency symbols or date formats uses their underlying serial numbers or raw numeric values. Format them with
TEXTfirst if you want to preserve their appearance.
Frequently Asked Questions
Q. What is the difference between TEXTJOIN and CONCATENATE?
A. CONCATENATE requires specifying delimiters individually and does not support range-based delimited joining, whereas TEXTJOIN lets you specify a delimiter once in the first argument and join an entire cell range while skipping blank cells.
Q. How do I use a line break as the delimiter in TEXTJOIN?
A. Pass CHAR(10) as the first argument (delimiter). For example, write "=TEXTJOIN(CHAR(10), TRUE, A2:A5)" and enable text wrapping on the cell to join values separated by line breaks.