TEXTJOIN Excel Function-Examples-Video
To quickly combine text and numbers from multiple cells in Excel, use the TEXTJOIN Excel function. Sarah shows the steps in this 3-minute video.
TEXTJOIN Function
The TEXTJOIN Excel function is available in Microsoft 365, or in Excel 2019 and later versions
It lets you combine text from multiple ranges, with the option to ignore empty cells.
- Note: For earlier versions of Excel, see my Combine Text/Numbers formula examples
TEXTJOIN Syntax
The TEXTJOIN syntax has 3 required arguments, and you can include optional text arguments:
TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
- delimiter: Character(s) to use between the text items, such as a comma or semi-colon
- ignore_empty: To ignore empty cells, use TRUE. To include empty cells, use FALSE.
- text1, [text2], …: Text items you want to join.
Simple TEXTJOIN Formula
First, here’s a basic example. In the screen shot below, there’s a list of day names in cells B4:B10.
To combine all the day names, separated by a comma and space, I put this formula in cell E5:
=TEXTJOIN(", ", TRUE, B4:B10)
In the screen shot below, all 7 days are listed in cell E5, separated with a comma and a space
- Sun, Mon, Tue, Wed, Thu, Fri, Sat
Note: Any empty cells in the days list would be ignored.
Specific Days Only
In the next example, I want TEXTJOIN to make a list of specific days only.
In the screen shot below, 3 days are marked with an x in column C – Mon, Wed and Fri.
The business is only open on those days.
Add Condition in TEXTJOIN
To list only the days marked with an x, I can add a condition to the TEXTJOIN formula.
Here’s my revised formula in cell E5, with an IF function creating the condition:
=TEXTJOIN(", ", TRUE, IF(C4:C10="X", B4:B10, ""))
Formula Results – Marked Days Only
Now the formula checks IF the cells in C4:C10 have an “X”.
- If a cell contains “X”, the TEXTJOIN formula returns the day name from column B.
- If there’s no “X”, the formula returns an empty string (“”).
In the screen shot below, only the days marked with an “X” are listed in cell E5:
- Mon, Wed, Fri
Get the Workbook
To experiment with the TEXTJOIN function, you can get the workbook that Sarah used in the video.
- Go to the TEXTJOIN page on my Contextures site,
- In the Download section, click the link to get the TEXTJOIN Examples workbook.
There are several other files on that page too, and more examples and videos to explore!
More Text Functions
There are many more text function pages on my Contextures site. Check these out, for tutorials, videos, and Excel files to download for practice.
Names, Split/Reverse First and Last
_________________