Applies To
Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web

The TEXTJOIN function combines text from multiple ranges and/or strings, and includes a delimiter used between each text value that will be combined. If the delimiter is an empty text string, this function will concatenate the ranges.

=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. If a number is supplied, it will be treated as text.

  • 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.

Example:

=TEXTJOIN(" ",TRUE, "The", "sun", "will", "come", "up", "tomorrow.") will return The sun will come up tomorrow.

If "," is uses as a delimiter, the result isThe,sun,will,come,up,tomorrow.

You can use a range such as =TEXTJOIN(" ",TRUE,D10:G10) 

This joins the text in cells D10 through G10. 

For more info and examples, see TEXTJOIN function.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.