Going Stellar

Home/Google Sheets reference

Google Sheets function · Text

JOIN in Google Sheets: syntax and examples

JOIN turns a list into a single text value. You pick the delimiter, then pass one or more ranges, arrays or plain values. It is the quickest way to build a comma-separated list from a column.

Syntax

JOIN(delimiter, value_or_array1, [value_or_array2, ...])

Arguments

ArgumentTypeRequiredWhat it does
delimiterstringyesThe text placed between the elements. It can be empty.
value_or_array1anyyesA value, a range or an array to join.
value_or_array2, ...anynoMore values or ranges, joined after the first.

Examples

The examples use this table, starting in A1:

NameTeamSales
AnaA120
BobB80
CrisA200
DanB50
=JOIN(", ", A2:A5)

Result: Ana, Bob, Cris, Dan

Four names in one cell, separated by a comma and a space.

Run in a Google Sheet (English US locale) on .

=JOIN(" / ", A2:A3, C2:C3)

Result: Ana / Bob / 120 / 80

Two ranges in one call: names first, then sales.

Run in a Google Sheet (English US locale) on .

=JOIN(", ", FILTER(A2:A5, B2:B5="A"))

Result: Ana, Cris

Only the people from team A. FILTER builds the list, JOIN flattens it to text.

Run in a Google Sheet (English US locale) on .

=JOIN("", "SKU-", 100+23)

Result: SKU-123

An empty delimiter glues the pieces together. Numbers are converted to text.

Run in a Google Sheet (English US locale) on .

=JOIN(" | ", "Total", SUM(C2:C5))

Result: Total | 450

Mix text and a calculated value in one label.

Run in a Google Sheet (English US locale) on .

Common errors

  • The delimiter comes first. Swapping it with the range, as in JOIN(A2:A5, ", "), gives no error: the list is lost and you get only ", ".
  • An empty text argument still counts as an element, so it leaves a trailing delimiter in the result.
  • JOIN returns text, even when every piece is a number, so the joined cell is not a number.

Compared with Excel

Excel has no JOIN. TEXTJOIN does the same job and adds an ignore-empty argument; Google Sheets has TEXTJOIN too.

Sources

  1. JOIN (Docs Editors Help)

Markdown version · All functions