top of page

You are learning Functions and Formulas in MS Excel

How do I concatenate text with the CONCATENATE or TEXTJOIN function?

Here's how you can concatenate text with the CONCATENATE or TEXTJOIN function in Excel:

CONCATENATE Function:

The CONCATENATE function allows you to join multiple text strings and/or cell references into a single string.

Syntax:

```excel
=CONCATENATE(text1, [text2], ...)
```

* text1: The first text string or cell reference to be joined.
* text2, ...: Additional text strings or cell references to be joined (up to 255 arguments).

Example:

```excel
=CONCATENATE("Hello, ", A1, "! Welcome to Excel.")
```

This formula will concatenate the text "Hello, ", the value in cell A1 (assuming it contains a name), and the text "! Welcome to Excel." into a single string displayed in the cell where the formula is entered.

TEXTJOIN Function:

The TEXTJOIN function offers more flexibility than CONCATENATE. It allows you to join text strings, specify a delimiter (separator) between them, and optionally choose to ignore empty cells.

Syntax:

```excel
=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
```

* delimiter: The text string (or cell reference containing text) to be inserted between each joined text element. (e.g., ", ", ", ")
* ignore_empty (optional): TRUE to exclude empty cells from the joined string, FALSE to include them (default).
* text1: The first text string or cell reference to be joined.
* text2, ...: Additional text strings or cell references to be joined (up to 252 arguments).

Example:

```excel
=TEXTJOIN(", ", TRUE, A1, B1, C1)
```

This formula will join the values in cells A1, B1, and C1 with a comma and space (", ") as a delimiter, but will exclude any empty cells from the final string.

Choosing Between CONCATENATE and TEXTJOIN:

- Use CONCATENATE for simple concatenation without needing a delimiter or handling empty cells.
- Use TEXTJOIN for more control over the joined string, including specifying a delimiter and ignoring empty cells.

bottom of page