EXCEL SOLUTIONS

TEXTJOIN function in Excel

Joins a whole range with a separator you choose, and can skip empty cells.

IntermediateText

Syntax

=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
Arguments of TEXTJOIN
ArgumentWhat it means
delimiterWhat to put between items, such as ", ".
ignore_emptyTRUE to skip blank cells.
text1, ...The cells or ranges to join.

Examples with results

Every result below is calculated by the practice engine on the sample data shown, not typed in by hand.

Team list (fictional)

RowABCDE
1NameDepartmentSalaryStart dateRating
2Amira HassanFinance92002019-03-044
3Ben CarterSales78002021-07-193
4Chen WeiSales81002020-01-135
5Dina AliHR72002022-09-014
6Emil NovakOperations69002018-11-262
7Farah KhanFinance104002016-05-095
8Gabriel SilvaOperations65002023-02-143
Team list (fictional) Row 1 holds the headings. All data is fictional. Dates are year-month-day.

Download CSV

  • =TEXTJOIN(", ",TRUE,B2:B8)Finance, Sales, Sales, HR, Operations, Finance, Operations

    List every department, comma separated

List A and list B (fictional)

RowAB
1OrderedReceived
2P-101P-102
3P-102P-101
4P-103P-105
5P-104P-103
6P-105
List A and list B (fictional) Row 1 holds the headings. All data is fictional. Dates are year-month-day.

Download CSV

  • =TEXTJOIN(", ",TRUE,B2:B6)P-102, P-101, P-105, P-103

    Received items, ignoring the empty cell

Try it yourself

Change the formula or switch to other sample data.

Press Calculate to see the result.

The practice box runs in your browser with BDK’s own calculator, which covers about 60 common functions. Cell references work as in Excel (B2, B2:B9). Your formulas are not saved or sent anywhere. For anything unusual, check the result in Excel itself.

How people use TEXTJOIN at work

  • Administration

    Make a comma list from a column.

    =TEXTJOIN(", ",TRUE,A2:A6)P-101, P-102, P-103, P-104, P-105
    Data: Price list (fictional)
  • Operations

    List items that are low on stock.

    =TEXTJOIN(", ",TRUE,B2:B6)Hinge 40 mm, Bracket set, Oak board, Zinc pin, Door handle
    Data: Stock levels (fictional)

Common mistakes and tips

  • TEXTJOIN does not remove duplicates. Clean the list first.

Works in

Excel 2019 and Microsoft 365 or later, and Google Sheets. Not in Excel 2016 or older.

Related formulas

CONCATTRIM

Lessons that use it

Tools that help

Need Something Different? Let’s Talk.

Looking for different features or something built around your workflow? Share your idea with us.