TEXTJOIN Function in Google Sheets

TEXTJOIN combines cells into one text value and inserts your chosen separator between them. Set ignore_empty to TRUE when blank cells should disappear without leaving extra separators.

The simplest pattern is =TEXTJOIN(" ",TRUE,A2:C2). It joins the nonblank values in A2:C2 with one space.

TEXTJOIN Function Syntax in Google Sheets

=TEXTJOIN(delimiter, ignore_empty, text1, [text2, ...])
  • delimiter is the separator, such as a space, comma, dash, or line break.
  • ignore_empty is TRUE to skip empty values or FALSE to keep their positions.
  • text1 is the first cell, range, or text value.
  • text2 and later arguments add more values or ranges.

When to Use TEXTJOIN

  • Combine first, middle, and last names.
  • Build an address from separate fields.
  • Turn a column into a comma-separated list.
  • Ignore missing values without doubled separators.
  • Place each source value on a new line.

Combine First and Last Names With a Space

FirstMiddleLast
MinaShah
OmarTReed
Ana=””Li
=TEXTJOIN(" ",TRUE,A2:C2)

The space inside quotation marks is the delimiter. The tested result is Mina Shah.

Build a Full Address With Commas

For a complete address built from literal text, use:

=TEXTJOIN(", ",TRUE,"Austin","TX","78701")

The comma and following space form one delimiter. The result is Austin, TX, 78701.

Skip Blank Middle Names

With TRUE, a missing middle value is skipped:

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

The result is Mina Shah. The same tested range with FALSE returns Mina  Shah, with two spaces around the blank position.

TEXTJOIN skips an empty middle name when ignore_empty is TRUE; FALSE retains an extra separator.

A formula returning an empty string is also skipped in the tested sheet. Row 4 returns Ana Li from the same formula.

Merge a Whole Column Into One Cell

Suppose E2:E6 contains Apple, Banana, a blank, Cherry, and Date. Join the list with:

=TEXTJOIN(", ",TRUE,E2:E6)

The tested result is Apple, Banana, Cherry, Date. A column range works the same way as a row range.

Use a Delimiter From a Cell

A delimiter can come from a cell. If F2 contains | , use:

=TEXTJOIN($F$2,TRUE,E2:E6)

The result is Apple | Banana | Cherry | Date. The absolute reference keeps the delimiter fixed if you copy the formula.

Join Values With Line Breaks

=TEXTJOIN(CHAR(10),TRUE,E2:E6)

CHAR(10) inserts a line break between items. Turn on text wrapping so every line is visible in the cell.

How TEXTJOIN Reads a Two-Dimensional Range

=TEXTJOIN("|",TRUE,A2:C3)

The tested result is Mina|Shah|Omar|T|Reed. Sheets reads across the first row, then continues across the next row.

For fixed arrays that should keep every position, compare the JOIN function. Use SPLIT when you need to separate a combined value.

Google’s TEXTJOIN reference lists the function’s arguments and blank handling.

Other Google Sheets articles you may also like