All in One Bundle

TEXTJOIN IF Excel

Written by ExcelMojo Team ExcelMojo Editorial Team Editorial Team The ExcelMojo Editorial Team creates and improves practical Excel, VBA, Power BI, analytics, and AI spreadsheet resources for learners, analysts, teams, and business professionals. Excel VBA Power BI View Full Bio
Reviewed by Dheeraj Vaidya, CFA, FRM Dheeraj Vaidya, CFA, FRM Co-Founder & Course Director Dheeraj is the founder of ExcelMojo and leads the learning direction across Excel, analytics, financial modeling, valuation, and AI spreadsheet workflows. A former J.P. Morgan and CLSA equity... Financial Modeling Valuation Investment Banking View Full Bio
Updated Apr 28, 2026
Read Time 6 min

What Is TEXTJOIN IF Excel?

TEXTJOIN IF Excel function can ignore empty cells and apply unique separators only where necessary. This makes it an ideal tool for creating concise and structured outputs in reports or datasets. The combination allows for efficient data manipulation, such as generating category summaries or filtering data based on specified parameters. The functions in complex formulas provide flexibility in generating customized outputs based on varying conditions within a dataset.

The following example serves to illustrate the values, and we will calculate the value using the TEXTJOIN function with the IF function in Excel.

Download FREE TEXTJOIN IF Excel Template and Follow Along!

Use this TEXTJOIN IF Excel Template to follow along with the examples in this article.

Download Excel Template

To calculate the output, please follow these steps:

Select the cell where the formula will be entered, and the result will be calculated. In this case, let’s choose cell D2.

TEXTJOIN IF Excel Definition 1

Enter the formula in cell D2. The complete formula to be entered in cell D2 is

{=TEXTJOIN(“, “,TRUE,IF(B2:B6=2,A2:A6, “”))}. After entering each value in the previous step, press the Enter key. The resulting value in cell D2 will be displayed below, as shown in the provided image.

TEXTJOIN IF Excel Definition 1 (1)

How To Use TEXTJOIN IF Function In Excel? (With Steps)

To efficiently utilize the TEXTJOIN IF function in Excel, you can follow these step-by-step instructions.

  1. Firstly, ensure you have data sets in your worksheet where you want to join text values based on specific criteria.

  2. Next, select an empty cell to which you wish to apply the formula. Then, input “=TEXTJOIN(“”, “”, TRUE” within the cell and specify the delimiter within the

  3. Subsequently, provide logical criteria within the “IF” portion of the formula using a range or array that corresponds to each criterion for text joining. Ensure both ranges are equal in size for accurate results.

  4. Once completed, close parentheses and hit Enter—this will successfully combine all text values from specified cells meeting defined criteria into one cell while ignoring any blank cells.

This method proves highly efficient when dealing with large datasets containing diverse information that require specific conditions for combination—ultimately enhancing productivity and accuracy in Excel-driven tasks.

Examples

Example #1

The following example serves to illustrate the values, and we will calculate the value using the TEXTJOIN function with the IF function in Excel.

In the table,

  • Column A contains the Item.
  • Column B contains the Value.

The steps are:

Step 1: Select the cell where we have to enter the formula. In this case, we will choose cell D2.

TEXTJOIN IF Excel Example 1 Step 1

Step 2: Enter the formula in cell D2.

Step 3: The complete formula to be entered in cell D2 is

{=TEXTJOIN(“, “,TRUE,IF(B2:B6=”abc”,A2:A6,””))}.

TEXTJOIN IF Excel Example 1 Step 3

Step 4: After entering each value in the previous step, press the Enter key. The resulting value in cell D2 will be displayed below, as shown in the provided image.

TEXTJOIN IF Excel Example 1 Step 4

Example #2

The following example serves to illustrate the values, and we will calculate the value using the TEXTJOIN function in Excel, combined with the IF function.

In the table,

  1. Column A contains the Item.
  2. Column B contains the Value.

The steps are:

Step 1: Select the cell where we have to enter the formula. In this case, let’s choose cell D2.

TEXTJOIN IF Excel Example 2 Step 1

Step 2: Enter the formula in cell D2.

Step 3: The complete formula to be entered in cell D2 is

{=TEXTJOIN(“, “,TRUE,IF($B$2:$B$6=200,$A$2:$A$6,””))}.

TEXTJOIN IF Excel Example 2 Step 3

Step 4: After entering each value in the previous step, press the Enter key. The resulting value will be displayed in cell D2, as shown in the provided image.

TEXTJOIN IF Excel Example 2 Step 4

Example #3

The following example serves to illustrate the values, and we will calculate the value using the TEXTJOIN function in Excel, combined with the IF function.

In the table,

  1. Column A contains the Students’ names.
  2. Column B contains the Marks.

The steps are:

Step 1: Select the cell where we have to enter the formula. In this case, let’s choose cell D2.

TEXTJOIN IF Excel Example 3 Step 1

Step 2: Enter the formula in cell D2.

Step 3: The complete formula to be entered in cell D2 is

=TEXTJOIN(“, “,TRUE,IF(B2:B6>60,A2:A6,””)).

TEXTJOIN IF Excel Example 3 Step 3

Step 4: After entering each value in the previous step, press the Enter key. The resulting value will be displayed in cell D2, as shown in the provided image.

TEXTJOIN IF Excel Example 3 Step 4

Important Things To Note

  • Combining TEXTJOIN and IF functions empowers professionals to effectively organize, analyze, and communicate textual information in Excel spreadsheets with precision and efficiency
  • The combination of the TEXTJOIN and IF functions in Excel is a powerful tool for manipulating and analyzing large datasets. The TEXTJOIN function allows you to combine multiple strings, while the IF function allows for conditional evaluation. By using both functions together, professionals can streamline their workflow and enhance their data processing capabilities.

Frequently Asked Questions (FAQs)

1. Explain TEXTJOIN and IF functions with an example.


The following example serves to illustrate the values, and we will calculate the value using the TEXTJOIN function in Excel, combined with the IF function.
To calculate the output, please follow these steps:

Select the cell where the formula will be entered, and the result will be calculated. In this case, let’s choose cell D2.

TEXTJOIN IF Excel Question 1

Enter the formula in cell D2. The complete formula to be entered in cell D2 is
{=TEXTJOIN(“, “, TRUE, IF(B2:B6=200, A2:A6, “”))}. After entering each value in the previous step, press the Enter key.

The resulting value in cell D2 will be displayed below, as shown in the provided image.
TEXTJOIN IF Excel Question 1 (1)

2. Are there any limitations when using the TEXTJOIN IF function?


• Firstly, this function is only available for users who have an Office 365 subscription or Excel 2019 onwards. Therefore, individuals using older versions of Excel would not be able to take advantage of this feature.
• Additionally, the TEXTJOIN IF function has a maximum character limit of 32,767 characters, so if the concatenated result exceeds this threshold, it will return an error.
• Furthermore, it is crucial to consider that when using a range argument in conjunction with the TEXTJOIN IF formula, all non-numeric values within that range will be counted as TRUE values.

3. What are the benefits of using the TEXTJOIN IF function?


• Firstly, it allows for the concatenation of multiple text strings with a specified delimiter, which simplifies data manipulation tasks. This feature proves invaluable in scenarios requiring selective concatenation, such as filtering data or creating dynamic reports.
• Additionally, using TEXTJOIN IF eliminates the need for repetitive manual operations and reduces the chances of errors that may occur during complex string manipulations.

Download FREE TEXTJOIN IF Excel Template and Follow Along!

Use this TEXTJOIN IF Excel Template to follow along with the examples in this article.

Download Excel Template