How to Use TEXTJOIN in Google Sheets

By Tomosuke Hasegawa · Updated Oct 29, 2026 · Beginner to intermediate · 6 min read · includes 2 free exercises

In short: TEXTJOIN combines text from several cells or ranges, with a separator you choose between each piece. The formula is =TEXTJOIN(delimiter, ignore_empty, text1, [text2, ...]).

What TEXTJOIN does

You can join cells with the & operator, but it gets long fast, and it cannot take a whole range. TEXTJOIN joins a range in one step and puts the same separator between every piece. Use it for lists of names, tags, addresses or any set of values you want in one cell.

TEXTJOIN syntax

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

A step-by-step example

Here is a short list of tags in A1:A5. The fourth item, A4, is empty.

A
1Tag
2red
3green
4
5blue

To join the tags into one comma-separated line:

=TEXTJOIN(", ", TRUE, A2:A5)

This returns red, green, blue. Here is why:

  1. The delimiter ", " goes between each piece of text.
  2. TRUE tells Sheets to skip the empty cell A4.
  3. That leaves three items and two separators.

What ignore_empty changes

Set it to FALSE and the empty cell is kept, which leaves two separators in a row:

=TEXTJOIN("-", FALSE, A2:A5)

This returns red-green--blue. For tidy lists you almost always want TRUE.

Common TEXTJOIN mistakes

Try it yourself

Use the tag list above (A1:A5, where A4 is empty). Type your formula into the box, starting with =, then press Check.

Exercise 1: Comma-separated list

Write a formula that joins A2:A5 into one cell, separated by a comma and a space, skipping empty cells.

Hint: the delimiter is ", " and ignore_empty is TRUE.

Exercise 2: Keep the gaps

Write a formula that joins A2:A5 with a hyphen (-) and keeps empty cells.

Hint: set ignore_empty to FALSE.

What to learn next

Syntax and rules in this guide were checked against Google's TEXTJOIN help page. See all guides.