TEXTJOIN
The TEXTJOIN function in Google Sheets allows you to combine the text from multiple strings and/or arrays, with a specifiable delimiter separating the different texts.
Function Syntax and Parameters
Syntax: TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
Parameters:
delimiter: The delimiter to use for separating the texts.ignore_empty: Specifies whether to ignore empty cells or not. A value ofTRUEwill ignore empty cells, whileFALSEwill include them.text1: The first text or range to be included in the concatenation.text2, ...: [Optional] Additional texts or ranges to be included.
Step-by-Step Tutorial
-
Using
TEXTJOINwith strings:- Example:
=TEXTJOIN(", ", TRUE, "Hello", "World") - Result:
"Hello, World"
- Example:
-
Using
TEXTJOINwith a range of cells:- Example: If
A1:A3contains the values"Apple","Banana","Orange", then=TEXTJOIN(", ", TRUE, A1:A3)will return"Apple, Banana, Orange".
- Example: If
Use Cases and Scenarios
- Mailing Labels: Combine address cells into a single cell for printing mailing labels.
- List Generation: Concatenate a list of items or words into a single cell, separated by commas or any other delimiter.
- Data Cleanup: Merge columns or rows of data into a unified format.
Related Functions
CONCATENATE: Combines multiple strings into a single cell.JOIN: Similar toTEXTJOIN, but only works for a single range or array of items.