Google Sheets TEXTJOIN: Combine Text Fast
In this article
Google Sheets TEXTJOIN combines text from multiple cells into one string, with a delimiter of your choice and an option to ignore empty cells. The function is TEXTJOIN(delimiter, ignore_empty, text1, [text2, ...]). For example, =TEXTJOIN(", ", TRUE, A1:A5) joins the values in A1 through A5 with a comma and space, skipping any blanks. This guide walks through using it step by step, plus common mistakes and fixes.
What You'll Need
- A Google account and access to Google Sheets (free with any Google account).
- A spreadsheet with the text you want to combine, or a blank sheet to practice in.
- Basic familiarity with typing formulas in a cell.
Step-by-Step
- Open your spreadsheet. Go to sheets.google.com and open an existing file or create a new blank spreadsheet. The steps below apply to the desktop browser version; the mobile app works similarly but formula entry is more cramped.
- Click the cell where the combined text should appear. This is the output cell. It can be on the same sheet or a different one.
- Type the formula starting with an equals sign. Begin with
=TEXTJOIN(. The opening parenthesis tells Sheets you are entering a function. - Enter the delimiter as a text string in quotes. The delimiter is what goes between each value. Common choices:
", "for a comma and space," "for a space," - "for a dash, orCHAR(10)for a line break (works when wrap text is on). If you want no separator, use"". - Type a comma, then TRUE or FALSE for ignore_empty.
TRUEskips blank cells so you do not get doubled delimiters.FALSEincludes blanks, which can produce extra commas. Most people wantTRUE. - Type a comma, then select the range or cells to join. You can drag over a range like
A2:A10, or list individual cells separated by commas:A2, B2, C2. You can mix ranges and single cells. - Close the parenthesis and press Enter. The formula should look like
=TEXTJOIN(", ", TRUE, A2:A10). The cell now shows the joined text. - Copy the formula down or across if needed. Drag the fill handle (small square at the bottom-right of the cell) to apply the same formula to other rows. Relative references adjust automatically.
- Convert to plain text if you want to remove the formula. Select the output cells, copy them (Ctrl+C or Cmd+C), then use Paste special > Values only (Ctrl+Shift+V or Cmd+Shift+V) to replace formulas with static text.
Common Mistakes
- Forgetting quotes around the delimiter.
TEXTJOIN(, TRUE, A1:A5)returns an error because the delimiter must be a text string. Use""for no delimiter. - Using a comma as delimiter without quotes. A bare comma is read as an argument separator, not text. Always wrap it:
", ". - Setting ignore_empty to FALSE by accident. This inserts delimiters for blank cells, giving results like
apple, , banana. UseTRUEunless you specifically need placeholders. - Referencing a whole column.
A:Acan be slow in large sheets and may include header text. Use a bounded range likeA2:A100. - Expecting TEXTJOIN to work in very old Excel files. TEXTJOIN is a Google Sheets function; if you export to .xlsx and open in an older Excel version, it may not calculate. Keep a copy in Sheets or convert values to static text before exporting.
- Mixing text and numbers without formatting. Numbers join as their raw value, so 0.5 becomes "0.5" not "50%". Pre-format with TEXT() if needed:
TEXTJOIN(", ", TRUE, TEXT(A1,"0%")).
Tips
- Use
CHAR(10)as the delimiter to put each value on its own line, then turn on Format > Wrapping > Wrap for the output cell. - Combine TEXTJOIN with UNIQUE or FILTER to join only distinct or filtered values:
=TEXTJOIN(", ", TRUE, UNIQUE(A2:A20)). - If you need a separator only between non-blank values, keep ignore_empty TRUE; it handles that automatically.
- For a quick concatenation of just two or three cells, the ampersand operator (
=A1 & " " & B1) is simpler, but TEXTJOIN scales better for ranges. - Name your ranges (Data > Named ranges) to make formulas easier to read and maintain.
Troubleshooting
If TEXTJOIN returns #NAME?, the function name is misspelled or you are in a locale that uses a different separator; check spelling first. If you see #VALUE!, confirm the delimiter is in quotes and that ignore_empty is TRUE or FALSE, not a cell reference. If the result looks wrong, click the cell and inspect the formula bar for stray spaces or a misplaced comma. If the formula worked yesterday and now shows an error, check whether the referenced range was deleted or moved. If the output is truncated, the cell may be too narrow; widen the column or enable wrap text. If you copied the formula to another sheet and references broke, use absolute references ($A$2:$A$10) where the range should not shift.
Frequently Asked Questions
What is the difference between TEXTJOIN and CONCATENATE?
CONCATENATE (and the & operator) joins individual cells you list one by one. TEXTJOIN accepts a whole range and a delimiter, and can skip blanks, which makes it faster for long lists.
Can TEXTJOIN combine values from multiple sheets?
Yes. Reference the sheet name with an exclamation mark, for example =TEXTJOIN(", ", TRUE, Sheet2!A2:A10). Sheet names with spaces need single quotes: 'Sheet 2'!A2:A10.
Does TEXTJOIN work on the Google Sheets mobile app?
Yes, the function is available in the mobile app. Typing long formulas on a phone is awkward, so many people build the formula on desktop and then view or edit it on mobile.
How do I add a line break between joined values?
Use CHAR(10) as the delimiter and turn on wrap text for the output cell. On Windows the line break character is the same; on some systems CHAR(13) may be needed, but CHAR(10) is standard in Sheets.
Why does my TEXTJOIN result show extra commas?
The ignore_empty argument is likely FALSE, or some cells contain spaces rather than being truly blank. Set ignore_empty to TRUE and trim cells with TRIM() if needed.
Can I use TEXTJOIN to create a comma-separated list for email or CSV?
Yes. Join with "," (no space) for CSV-style output, then copy the result and paste as values into a text file. For email lists, join with "; " depending on your mail client's separator.