The TEXTJOIN function combines the text from multiple ranges and/or strings, and includes a delimiter you specify between each text value that will be combined. If the delimiter is an empty text string, this function will effectively concatenate the ranges.
Syntax
TEXTJOIN(delimiter, ignore_empty, text1, [text2], …)
- delimiter: Required, A text string, either empty, or one or more characters enclosed by double quotes, or a reference to a valid text string.
- ignore_empty: Required, If TRUE, ignores empty cells.
- text1: Required, Text item to be joined. A text string, or array of strings, such as a range of cells.
- text2, …: Optional, Additional text items to be joined. There can be a maximum of 252 text arguments for the text items, including text1. Each can be a text string, or array of strings, such as a range of cells.
Specifics
- If the resulting string exceeds 32767 characters (cell limit), TEXTJOIN returns an error.
- the delimeter is treated as a single character or string inserted between each tesulting text item, the delimeter may be a cell reference, but cannot be a range otherwise an unexpected result will occur.
Examples
| Data (A1) | |
|---|---|
| US Dollar | |
| Australian Dollar | |
| Chinese Yuan | |
| Hong Kong Dollar | |
| Israeli Shekel | |
| South Korean Won | |
| Russian Ruble | |
| Formula | Result |
| =TEXTJOIN(“, “, TRUE, A2:A8) | US Dollar, Australian Dollar, Chinese Yuan, Hong Kong Dollar, Israeli Shekel, South Korean Won, Russian Ruble |
| Data (A1) | |
|---|---|
| a1 | b1 |
| a2 | b2 |
| a4 | b4 |
| Formula | Result |
| =TEXTJOIN(“, “, TRUE, A2:B5) | a1, b1, a2, b2, a4, b4 |
| =TEXTJOIN(“, “, False, A2:B5) | a1, b1, a2, b2, , ,a4, b4 |