Excel - CONCAT Function



CONCAT Function

The Excel CONCAT function joins the input strings in a specific range of cells without using IgnoreEmpty arguments or delimiters. However, in the Excel older versions, the CONCATENATE function was being used. For example, you could use the CONCAT function to combine space scientists' names with their SPIDs. Alternatively, the TEXTJOIN function has the same functionality, including delimiters among different text strings.

In Excel 2016, the CONCAT Function was interchanged with the CONCATENATE Function.

Compatibility

This advanced Excel function is compatible with the following versions of MS-Excel −

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2024
  • Excel 2024 for Mac
  • Excel 2021
  • Excel 2021 for Mac
  • Excel 2019
  • Excel 2016

Syntax

The syntax of the CONCAT function is as follows −

=CONCAT (text1, [text2] ...)

Arguments

You can utilize the following arguments with the CONCAT function −

Argument Description Required / Optional
text1 An array strings, a text, or a cell range to be merged. Required
Text2, ... Additional text string, range of cells to be merged. There are not more than 253 text arguments for the qualitative value. Optional

Points to Remember

  • You can utilize the commas for text item differentiation.
  • In the CONCAT formula, you can either insert double quotes with single spaces among the text items to segregate the text items or insert an extra space after each string value.
  • If the designated string contains more than 32767 characters, the CONCAT function will receive the #VALUE! Error.
  • The CONCAT function is not executed if the cell formatting is other than General.
  • Ensure that the text string is enclosed in double quotes; otherwise, the CONCAT function will not work.

Examples of CONCAT Function in Excel

Practice the following example to learn the use of the CONCAT function in Excel.

Example 1: How to use CONCAT Function in Excel?

The CONCAT function in Excel is used to join multiple strings of text together into a single string.

Solution

Step 1 − Consider the sample dataset where the text values are written in the cell range B2:B6.

CONCAT Function

Step 2 − First, enter the formula =CONCAT(B2:C6) in the E2 cell and press the Enter tab.

CONCAT Function 1

Therefore, the resulting text string is B1C1B2C2B3C3B4C4B5C5.

CONCAT Function 2

Step 3 − After that, select the E2 cell, enter the formula =CONCAT(B2:B6,C2:C6) in the E3, and hit the Enter tab.

CONCAT Function 3

Hence, the CONCAT function retrieves the B1B2B3B4B5C1C2C3C4C5 text string.

CONCAT Function 4

Step 4 − Furthermore, move the cursor to the E4 cell and write the formula =CONCAT(B4," ",C4).

CONCAT Function 5

Hit the Enter tab.

CONCAT Function 6

Step 5 − Afterward, go to the E5 cell and type the formula =CONCAT(B5," & ",C5) and press the Enter tab.

CONCAT Function 7

CONCAT Function 8

Step 6 − Write the formula =CONCAT("Power"," ","Pivot") in the E6 cell.

CONCAT Function 9

Press the Enter tab to obtain the resulting string.

CONCAT Function 10

Example 2: How to Add a Carriage Return in Excel?

To add a carriage return (line break) within the CONCAT function in Excel, you can use the CHAR(10) function, which represents a line break in Windows.

Solution

You can employ the CHAR(10) function to embed the carriage return within the cell. Before implementing the CONCAT function, ensure that wrap text is selected in Excel.

First, select the B3 cell and write the formula.

=CONCAT("Hub",CHAR(10),"Routers",CHAR(10),"Switches ")
CONCAT Function 11

After that, hit the Enter tab.

CONCAT Function 12

Therefore, the CONCAT function will retrieve each text item using line breaks.

Download Practice Sheet

You can download and use the sample data sheet to practice the CONCAT function.

Advertisements