TEXTJOIN(delimiter, ignore_empty, text1, [text2], …)One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.
delimiter:
The character or characters that you want to use to separate the text items in the resulting string.
ignore_empty:
A boolean value (TRUE or FALSE) that specifies whether to ignore empty cells in the text items.
text1:
The first text item or range of cells that you want to join.
[text2]:
Additional text items or ranges of cells that you want to join, which can be specified as additional arguments.
The TEXTJOIN function in Google Sheets is a powerful tool used to concatenate multiple strings of text from a range or array, with a specified delimiter separating each value. It simplifies the process of combining text, especially when dealing with large datasets or when you want to include only non-empty cells. Unlike the traditional CONCATENATE function, TEXTJOIN allows for more flexibility and efficiency in handling text strings.
In simpler terms, TEXTJOIN allows you to merge text from different cells into one cell, making it easier to create summaries or combined entries.
Imagine you are managing a list of students and their respective subjects in a Google Sheets document:
| StudentID | StudentName | Subjects |
|---|---|---|
| 1 | Alice | Math |
| 2 | Bob | Science |
| 3 | Charlie | Math |
| 4 | David | History |
You want to create a single cell that lists all the subjects each student is enrolled in, separated by commas.
To achieve this, you would use the TEXTJOIN function as follows:
=TEXTJOIN(", ", TRUE, Students!C:C)In this formula:
", " is the delimiter that separates each subject.TRUE indicates that empty cells should be ignored.Students!C:C is the range from which the function will concatenate the subjects.When you apply the TEXTJOIN formula to the Students Table, the output would look like this:
| StudentID | StudentName | Subjects |
|---|---|---|
| 1 | Alice | Math |
| 2 | Bob | Science |
| 3 | Charlie | Math |
| 4 | David | History |
If you were to add a new subject for a student, the result would automatically update to include the new subject in the concatenated list.
TEXTJOIN is beneficial because it streamlines the process of combining text from multiple cells. It eliminates the need for complex formulas or manual concatenation, saving time and reducing errors. Additionally, it allows for the inclusion of only non-empty cells, making your data cleaner and more readable.
TEXTJOIN is an essential function for anyone working with text data in Google Sheets, providing a powerful way to enhance data presentation and organization.
Happy spreadsheeting!
You have a list of sales data in Column A and corresponding product names in Column B. Use TEXTJOIN to combine all product names sold in a specific month into a single cell, streamlining reporting and making it easier to analyze sales performance.
Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.
Browse our complete library of Google Sheets formula guides
Compare your options
Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.
AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.