SheetsLessons
Text function

TEXTJOIN function in Google Sheets

TEXTJOIN combines a list or range of text with a separator between each item, and can skip empty cells. It's the cleanest way to turn a column into a comma-separated list.

Syntax

=TEXTJOIN(delimiter, ignore_empty, text1, [text2, ...])
delimiter
The text placed between items, e.g. ", ".
ignore_empty
TRUE to skip blank cells, FALSE to keep them (producing doubled separators).
text1
The first value or range.
text2, ...
Optional. More values or ranges.

Practice TEXTJOIN

Task 1 of 2

Join all the tags in A2:A7 into one cell separated by ", ", skipping blanks. Answer in C2.

C2
fx

Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.

TEXTJOIN examples

Each example below runs against this sample sheet. The results are calculated by the same engine as the practice grid.

ABCDE
1Emp IDNameDeptEmailSalary
21042Maya PatelFinancemaya.patel@acme.co$72,000.00
31187Leo RossiSupportleo.rossi@acme.co$51,000.00
41305Ava KimSalesava.kim@acme.co$64,000.00
51411Omar AliMarketingomar.ali@acme.co$58,000.00
61520Hana TanakaSaleshana.tanaka@acme.co$69,000.00
Employee directory
FormulaResultWhat it shows
=TEXTJOIN(", ", TRUE, C2:C6)Finance, Support, Sales, Marketing, SalesEvery department as one list.
=TEXTJOIN(" | ", TRUE, B2:C2)Maya Patel | FinanceJoin across a row.
=TEXTJOIN("-", FALSE, A2:A3)1042-1187Numbers are joined as text.

Tips and common mistakes

  • For a de-duplicated list, Google Sheets lets you nest UNIQUE: =TEXTJOIN(", ", TRUE, UNIQUE(C2:C6)).

Related functions