Text result of TEXTJOIN is longer than the limit of 50000 characters — Google Sheets fix
Updated
TEXTJOIN of a long column returns #VALUE!. The tooltip is Text result of TEXTJOIN is longer than the limit of 50000 characters. The delimiter and the TRUE / FALSE ignore-empty flag are fine. The result string does not fit in one cell. Google Sheets caps a cell at 50,000 characters, whether a formula produces the text or you try to type it.
This page is the length cap. An empty delimiter that smushes codes into one blob, or a blocked BYROW spill, is TEXTJOIN spill / delimiter. JOIN versus TEXTJOIN on blanks and on two-dimensional ranges is JOIN vs TEXTJOIN. Keep the Google Sheets UI in English.
Recreate it on a blank sheet
Section titled “Recreate it on a blank sheet”- Open a blank spreadsheet. In A1 type
n. In A2 enter=SEQUENCE(11000). A2 spills the numbers 1 through 11000 down column A. You do not need to type them.
Over the cap. In C1 type join. In C2 enter =TEXTJOIN(",",TRUE,A2:A11001). C2 is #VALUE!. Hover C2. The tooltip is Text result of TEXTJOIN is longer than the limit of 50000 characters. The numbers plus 10,999 commas are longer than 50,000 characters. Leave C2 broken.
Under the cap, as contrast. In C4 enter =TEXTJOIN(",",TRUE,A2:A1000). C4 is a long string and LEN(C4) is well under 50,000 (the numbers 1–1000 and their commas). That cell is the control: the function works; the first formula was only too long.
JOIN names itself, & is reported as CONCAT. In E2 enter =JOIN(",",A2:A11001). E2 is #VALUE!. Hover it and read the function name in the tooltip; it should be JOIN and the same 50000-character limit. In E4 enter =REPT("a",30000)&REPT("b",30000). E4 is #VALUE!. The tooltip is Text result of CONCAT is longer than the limit of 50000 characters. You never typed CONCAT. The & operator is reported under that name. Leave E2 and E4 broken.
REPT has a lower cap. In E6 enter =REPT("a",60000). E6 is #VALUE!. The tooltip is Text result of REPT is longer than the limit of 32000 characters. REPT stops at 32,000, before the cell’s 50,000 cap. Leave E6 broken so the two limits stay different.
Typing past the cap is a different message. You cannot paste 50,001 characters into a cell. Sheets rejects the input at entry time. The wording is about the input containing more than the maximum of 50000 characters in a single cell, not “Text result of TEXTJOIN…”. Do not use a typed overflow as the main recreate; the formula tooltip is this page.
What is actually wrong
Section titled “What is actually wrong”- The 50,000 figure is a character limit on the result, including every delimiter.
", "is one character longer than","at each gap. Ten thousand items have 9,999 gaps, so a trailing space in the delimiter adds 9,999 characters. TEXTJOIN,JOIN,CONCATENATE, and&all have to land in one cell. Each tooltip names the function that produced the string.&shows up asCONCAT.REPTis stricter: 32,000 characters. AREPTfailure is not fixed by shortening a delimiter onTEXTJOIN.TEXTJOIN(",",TRUE,A:A)looks harmless and is the usual way to blow the cap: the range includes far more rows than the few you can see.- Pasting or typing into a cell has the same 50,000 cap, with a different message at entry time. This page’s
#VALUE!is the formula result.
This is not TEXTJOIN spill / delimiter. An empty delimiter still produces a short blob like N12E7W4 when the range is small. This is not a blocked spill #REF!. C2 is #VALUE! and the formula sits in one cell. This is not calculation limit or a workbook cell budget.
Leave C2, E2, E4, and E6 as #VALUE!.
Join less, or join in chunks. In C6 enter =TEXTJOIN(",",TRUE,A2:A500). C6 succeeds. For real data, prefer a filtered range: =TEXTJOIN(",",TRUE,FILTER(A2:A,B2:B="Yes")). If you truly need every value, split the column into blocks that each stay under the cap, for example 1,000 rows at a time:
=BYROW(WRAPROWS(TOCOL(A2:A11001,1),1000),LAMBDA(r,TEXTJOIN(",",TRUE,r)))Each spilled cell is one chunk. LEN of those cells should stay under 50,000. WRAPROWS padding with #N/A on a short last row is WRAPROWS pad; TOCOL already dropped blanks if you passed 1.
Do not store a file payload in a cell. If another system wants one comma-separated list, File → Download → Comma-separated values (.csv) of the column, or join the values in Apps Script and write a Drive file. A cell is the wrong container.
Check length before you scale. =LEN(TEXTJOIN(",",TRUE,A2:A1000)) on a sample, then multiply by the real row count, including delimiters.
If the join is short and the cell is still an error, it is not this limit. A two-dimensional range passed to JOIN is JOIN vs TEXTJOIN. A #REF! under BYROW is TEXTJOIN spill / delimiter.