Google Sheets Tips

JOIN and TEXTJOIN in Google Sheets: join a range into one cell

JOIN and TEXTJOIN merge the values of a range into one text, with a separator between them. TEXTJOIN can skip empty cells and accepts ranges of any shape; JOIN takes single rows or columns only. This guide works both on a campaign export, with lists built by FILTER, UNIQUE and SORT, line breaks as a separator, joining row by row, and the live campaigns of each channel in one cell for the summary.

Google Sheets TipsVadym Kramarenko9 min read

JOIN and TEXTJOIN in Google Sheets: join a range into one cell

JOIN and TEXTJOIN merge the values of a range into one text, with a separator of your choice between them:

=JOIN(", ", D3:D12)

=TEXTJOIN(", ", TRUE, D3:D12)

Both return a list such as “brand_search, generic_search, bf_teaser”. TEXTJOIN has one more argument, which decides what happens to empty cells, and accepts ranges of any shape.

The question this guide answers with them comes from the weekly marketing meeting: which campaigns are live in each channel, one cell per channel, so the summary fits on one screen? The answer is one TEXTJOIN formula, in the section on where this shows up in a report.

JOIN TEXTJOIN
Syntax JOIN(delimiter, value_or_array1, ...) TEXTJOIN(delimiter, ignore_empty, text1, ...)
Empty cells Always included, so separators double up Skipped when ignore_empty is TRUE
A range of several rows and columns #VALUE! Joined row by row
Several ranges in one formula Yes Yes

In practice TEXTJOIN with TRUE covers everything JOIN does, and it is the one to learn. JOIN remains a shorter spelling for a clean row or column.

Every example below runs on one campaign export: a header in row 2 and ten campaigns in rows 3 to 12.

Column Holds
B Channel
C Market, empty when the campaign runs in every market
D Campaign name
E September spend; empty if the campaign has not spent yet
F, G Start and end date
H Status: Active or Paused

Reading to get this done?

JOIN

JOIN

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

  • delimiter: the text to put between the values. It can be empty, "".
  • value_or_array: values, or ranges of a single row or a single column.

=JOIN("/", B3:D3)

It returns Paid search/US/brand_search: one label for the campaign.

Dates in a range come out as the cells display them:

=JOIN("/", F3:G3)

It returns 2026-09-01/2026-09-30. That is a difference from the ampersand: =F3 & "/" & G3 on the same cells returns the underlying serial numbers, 46266/46295. For a number, do not count on its display format (a currency sign, a thousands separator) surviving the join; when the format matters, build the piece with TEXT, as in TEXT(E3, "#,##0"). More on the ampersand in the guide to CONCATENATE.

JOIN accepts several ranges, joined one after another:

=JOIN("-", D3:D5, E3:E5)

It returns the three campaign names, then their three spends: brand_search-generic_search-bf_teaser-1240-860-1480.

TEXTJOIN

TEXTJOIN

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

  • delimiter: the text between the values.
  • ignore_empty: TRUE to skip empty cells, FALSE to keep them.
  • text1, text2, …: values or ranges, of any shape.

With FALSE, an empty cell leaves two separators in a row. Three campaigns have no market, so their labels break:

=TEXTJOIN("/", FALSE, B3:D3)

Google Sheets with a campaign export in B2:H12 and the formula =TEXTJOIN(“/”, FALSE, B3:D3) filled down column I: rows 5, 7 and 11, where the market is empty, return labels with a double slash such as Paid social//bf_teaser

With TRUE, the gap disappears. The arguments can also be single cells in any order, which lets the formula rearrange the columns as it joins them: here the campaign comes before the channel.

=TEXTJOIN("/", TRUE, D3, B3, C3)

Row 5 now returns bf_teaser/Paid social.

Text can sit between the cells:

=TEXTJOIN(" ", TRUE, C3, B3, "|", D3)

It returns US Paid search | brand_search on row 3.

Hand this to your AI

All the products of an order, or all the campaigns of a client, belong in one cell, and you're copying them in by hand.

Paste this into your AI assistant. It writes the TEXTJOIN formula that gathers the values of each group in your sheet into one list, without blanks or duplicates.

The prompt

gather every value that belongs to each key in my sheet into one comma-separated cell per key, sorted, with blanks and duplicates left out

A column into a list

A column into a list

The most common use: a column of values turned into one comma-separated cell, for a filter, an email field or a query.

=TEXTJOIN(",", TRUE, B3:B12)

It returns all ten channel values, repeats included.

Without duplicates, sorted

=TEXTJOIN(", ", TRUE, SORT(UNIQUE(B3:B12)))

Google Sheets with the campaign export and the formula =TEXTJOIN(“, “, TRUE, SORT(UNIQUE(B3:B12))) in I3 returning Affiliate, Email, Paid search, Paid social

UNIQUE removes the repeats and SORT orders what is left: four channels.

Only the rows that meet a condition

=TEXTJOIN(", ", TRUE, FILTER(D3:D12, E3:E12 > 1000))

Google Sheets with the campaign export and a TEXTJOIN formula over FILTER in I3 returning brand_search, bf_teaser, competitor_terms, shopping_feed, the four campaigns that spent more than 1000

FILTER keeps the four campaigns that spent more than 1000 and TEXTJOIN lists them. When no row matches, FILTER returns #N/A and so does the formula; wrap it in IFNA to show a text: =IFNA(TEXTJOIN(", ", TRUE, FILTER(D3:D12, E3:E12 > 5000)), "none").

Each value with a label

Build the pieces with ampersands inside ARRAYFORMULA, then join them:

=ARRAYFORMULA(JOIN("; ", D3:D4 & " (" & E3:E4 & ")"))

It returns brand_search (1240); generic_search (860), ready to paste into a status email. If some rows are incomplete, JOIN keeps the empty shells: over D3:D12, the campaign with no spend comes out as winback ().

Filter the incomplete rows out before joining: =JOIN("; ", FILTER(D3:D12 & " (" & E3:E12 & ")", D3:D12 <> "", E3:E12 <> "")).

A line break as the separator

A line break as the separator

CHAR(10) is a line break, so the joined values appear one under another inside the cell:

=TEXTJOIN(CHAR(10), TRUE, C3:D3)

It returns US above brand_search in one cell.

One joined text per row

One joined text per row

TEXTJOIN returns a single value, also inside ARRAYFORMULA: given a table, it joins everything into one cell. To get one result for each row from a single formula, apply it row by row with BYROW:

=BYROW(B3:D12, LAMBDA(row, TEXTJOIN(" ", TRUE, row)))

BYROW passes each row of B3:D12 to TEXTJOIN in turn and returns a column of ten labels. The alternative is the plain formula =TEXTJOIN(" ", TRUE, B3:D3) filled down.

Split and join again

Split and join again

SPLIT cuts a text into parts and JOIN puts them back with another separator, which changes the delimiter of a list in one step:

=JOIN(", ", SPLIT(D4, "_"))

On generic_search it returns generic, search.

For a plain replacement of one separator with another, SUBSTITUTE is shorter: =SUBSTITUTE(D4, "_", ", ").

Where this shows up in a report

Where this shows up in a report

The weekly summary needs one line per channel: which campaigns are live, and what they spend. TEXTJOIN over FILTER gives the first column, one cell per channel.

Put the channels in I3 with =SORT(UNIQUE(B3:B12)); it fills I3:I6. Then in J3:

=IFNA(TEXTJOIN(", ", TRUE, FILTER($D$3:$D$12, $B$3:$B$12 = I3, $H$3:$H$12 = "Active")), "none live")

Fill it down to J6. On a sheet with channels in column A and campaigns in column B, the same idea for the channel in A2 reads =TEXTJOIN(", ", TRUE, FILTER(B:B, A:A = A2)). Put the live spend beside it in K3 with =SUMIFS($E$3:$E$12, $B$3:$B$12, I3, $H$3:$H$12, "Active").

Google Sheets with the campaign export and a summary block in I2:K6: Affiliate partner_network 530; Email none live 0; Paid search brand_search, generic_search, shopping_feed 4115; Paid social bf_teaser, retargeting, lookalike_buyers 2515

Channel Live campaigns Live spend
Affiliate partner_network $530
Email none live $0
Paid search brand_search, generic_search, shopping_feed $4,115
Paid social bf_teaser, retargeting, lookalike_buyers $2,515

Seven of the ten campaigns are live, $7,160 of the $8,385 spent in September. The line that matters is Email: both its campaigns are paused, and without IFNA the cell would show #N/A and look like a broken sheet. With it, the empty channel stays on the summary as its own line instead of disappearing.

The decision to write next to that line: does Email restart in October, or does its budget move to Paid search, where three campaigns are already live? The list in the cell does not decide it; it makes sure the question is asked.

Errors and wrong results

Errors and wrong results

⚠️ Error: #VALUE! in JOIN.

✅ Solution: The range has several rows and several columns. JOIN takes a single row or a single column; use TEXTJOIN for a block.

⚠️ Error: #N/A

✅ Solution: A FILTER or a lookup inside the formula found nothing, as for a channel with no live campaign. Wrap the formula in IFNA.

⚠️ Error: Separators with nothing between them: “A, , B”.

✅ Solution: There are empty cells in the range. Use TEXTJOIN with TRUE as the second argument. Cells that hold a space are not empty; clean them with TRIM.

⚠️ Error: A date is joined as a number such as 46266.

✅ Solution: The date was joined with an ampersand, or calculated inside the formula. Format it with TEXT: TEXT(F3, "yyyy-mm-dd").

⚠️ Error: The joined number cannot be used in calculations.

✅ Solution: The result of JOIN and TEXTJOIN is always text. Add up the spend with SUM or SUMIFS on the original column, not on the joined list.

Related Google Sheets functions

A joined list is a report built by hand

A joined list is a report built by hand

TEXTJOIN over FILTER is a small report: “the live campaigns of each channel, in one cell”. The formula is exact; the rows may not be. It is correct for the rows in the range today. When the rows come from an export, the list is as old as the export, and nothing in the cell says so: a campaign paused yesterday still shows as live, and the next person copies the summary into the meeting notes as if it were current.

The OWOX Data Marts extension for Google Sheets covers that half. A data analyst publishes a Data Mart (a table or an SQL query in your data warehouse, with the definitions the team agreed, such as which status counts as live) and makes it available for reports. In Sheets you open the extension, pick the Data Mart, tick the columns you want and run it. The rows land in a tab, ready for your formulas.

Google Sheets with the OWOX Data Marts extension open beside an ad spend table: the Unified Ad Spend Data Mart, nine of fourteen columns ticked and a Save & Run button – the rows in the sheet come from a governed Data Mart, not a pasted export

What changes for the person who maintains the sheet:

  • Refresh replaces re-export. Refresh current report in the extension menu re-runs the same pull, and a scheduled refresh keeps the tab current without anyone touching it.
  • The source is written on the sheet. The header cell of an imported tab carries a note with the Data Mart it came from, the time of the import and a link to the report.
  • No SQL and no data warehouse access needed. The analyst decides which Data Marts and columns are available. You choose from that list.

The extension does not write or change the analyst’s SQL. The lists your formulas build are then drawn from the current rows on every refresh. The extension comes with the OWOX Cloud plans of OWOX Data Marts; spreadsheet reporting describes both ways data reaches a sheet.

Hand this to your AI

All the products of an order, or all the campaigns of a client, belong in one cell, and you're copying them in by hand.

Paste this into your AI assistant. It writes the TEXTJOIN formula that gathers the values of each group in your sheet into one list, without blanks or duplicates.

The prompt

gather every value that belongs to each key in my sheet into one comma-separated cell per key, sorted, with blanks and duplicates left out

FAQ

Frequently Asked Questions

Are there any limitations when using JOIN and TEXTJOIN in formulas?

JOIN accepts only single rows or single columns, so a block such as B3:D12 returns #VALUE!, while TEXTJOIN joins it row by row. JOIN cannot skip empty cells: on a campaign with no market, a channel/market/campaign label comes out as Paid social//bf_teaser. Both always return text, so total the spend with SUM on the original column, not on the joined list. Both return one value even inside ARRAYFORMULA; use BYROW for one result per row. The result has to fit into a single cell.

How does TEXTJOIN differ from CONCATENATE in Google Sheets?

TEXTJOIN works on whole ranges and puts a delimiter of your choice between the values, so `=TEXTJOIN(", ", TRUE, D3:D12)` lists ten campaign names in one cell, and TRUE skips the empty ones. CONCATENATE also accepts ranges, but it adds no separator and keeps every empty cell, so the names run together. For a list of values, use TEXTJOIN; for a few cells joined with fixed text between them, CONCATENATE or the ampersand is enough.

What delimiters can be used with JOIN and TEXTJOIN?

Any text can be the delimiter: a comma and a space for a list of campaigns, a slash for a label such as Paid search/US/brand_search, a semicolon for an email field, or an empty string to run the values together. A line break works too: `=TEXTJOIN(CHAR(10), TRUE, C3:D3)` puts the market and the campaign on two lines in one cell. The delimiter can also come from a cell reference, so one formula can switch format for different reports.

Can I use JOIN and TEXTJOIN to combine data from multiple ranges?

Yes, both accept several ranges in one formula, and they join the first range and then the next. On a campaign export, `=JOIN("-", D3:D5, E3:E5)` returns three campaign names followed by their three spends: brand_search-generic_search-bf_teaser-1240-860-1480. The difference is the shape of each range: JOIN needs single rows or columns, TEXTJOIN also takes blocks, and only TEXTJOIN can skip the empty cells.

How does the TEXTJOIN function handle empty cells?

That depends on the second argument, ignore_empty. With TRUE, TEXTJOIN skips empty cells, so a campaign that runs in every market and has no market code still gets a clean label, such as bf_teaser/Paid social. With FALSE, the empty cell stays in and leaves two separators in a row: Paid social//bf_teaser. A cell that holds only a space is not empty, so clean such cells with TRIM first.

What is the purpose of the JOIN function in Google Sheets?

JOIN turns the values of one row or one column into a single text, with a delimiter between them. It is how a column of campaign names becomes one line for a status email, or how channel, market and campaign become one label: `=JOIN("/", B3:D3)` returns Paid search/US/brand_search. Dates keep their display format, unlike with the ampersand. For ranges with empty cells or several rows and columns, use TEXTJOIN instead.

Who wrote this

Vadym Kramarenko

Vadym Kramarenko Growth Marketing Manager

Vadym Kramarenko is a Growth Marketing Manager at OWOX, where he drives user acquisition and product-led growth strategies. He hosts the OWOX podcast, interviewing analytics professionals about data-driven marketing, attribution, and reporting best practices. Vadym specializes in turning complex analytics concepts into practical, actionable marketing frameworks.