How can I use a Concatenate If Formula in Excel?

The Concatenate If Formula in Excel allows you to combine cell contents from multiple cells into one cell. This is done by specifying a logical test and then the values from each cell that will be concatenated together. The formula can also be used to create a range of cells to concatenate from. This is done by entering a range of cells into the formula instead of a single cell reference. This can be a great time-saver when dealing with large amounts of data, as it eliminates the need to manually combine multiple cells.


The following examples show how to use a concatenate if formula in Excel.

Example 1: Concatenate If (By Column)

Suppose we have the following data in Excel:


We can use the following formula to concatenate cells in column A and B only if the value in column B is equal to “Good”:

=CONCAT(IF(B2="Good", A2:B2, ""))

The following screenshot shows how to use this formula in practice:

Concatenate if formula excel

If the cell in column B is equal to “Good” then the value in column C is equal to the concatenation of the cells in column A and B.

Otherwise, this formula simply returns a blank value.

Example 2: Concatenate If (By Row)

Once again suppose we have the following data in Excel:


We can use the following formula to concatenate all of the cells in column A where the value in column B is equal to “Good”:

=CONCAT(IF(B2:B7="Good", A2:A7, ""))

The following screenshot shows how to use this formula in practice:

Notice that the value in cell C2 is the result of concatenating every value in column A where the corresponding value in column B is equal to “Good.”

Note: You can find the complete documentation for the CONCAT function in Excel .

x