In Excel, TEXTJOIN can return a maximum of 32,767 characters in one cell—the worksheet cell-content limit. If its combined result is longer, the function returns #VALUE!; you cannot raise that limit, so the practical fix is to shorten the result or keep it in multiple cells.
The character limit and what counts toward it
The 32,767-character cap applies to the entire resulting cell value, not just the text taken from the source cells. Characters from every joined value count, as do the delimiters inserted between values. Spaces and punctuation are characters too. For example, joining 10,000 one-character entries with a comma and a space would need 29,998 characters: 10,000 letters plus 9,999 two-character delimiters. That fits. Adding more entries can push the total past the ceiling even if each source cell is short.
The limit is the same whether the result comes from TEXTJOIN, another formula, or text typed directly into a cell. The formula may be valid and its inputs may all be valid, yet the output still cannot fit. This is a limit on a single cell’s contents, not a total limit for the workbook: you can store more text across multiple cells.
Do not confuse the cell-content limit with what you can see in the grid. Excel may show only part of a long value in a narrow cell, or the display may be obscured by adjacent content. The formula bar can help inspect a cell, but it does not let the cell store more than 32,767 characters.
How TEXTJOIN’s arguments work
TEXTJOIN takes a delimiter, a setting for whether to ignore empty values, and one or more text inputs. A range can be supplied as one input, so joining hundreds of cells does not require writing each cell reference separately. In supported Excel versions, the function allows up to 252 text arguments, but that is an argument-count limit—not a limit of 252 cells. A range containing thousands of cells is still a single range argument.
With names in A2:A5, where A2 is Ana, A3 is blank, A4 is Bo, and A5 is Cy, this formula uses a comma and a space and skips the blank:
=TEXTJOIN(", ",TRUE,A2:A5)
The result is Ana, Bo, Cy. The delimiter appears between included values, not at the beginning or end. If the second argument is FALSE, the empty cell is not skipped; its position can leave two delimiters together. That distinction is useful when empty positions carry meaning, but it can create unexpected punctuation in a list.
Why a result may exceed the cap
To estimate the output length, add the lengths of all included values and the lengths of the delimiters between them. If there are n included values and a delimiter of d characters, the delimiter contribution is usually (n − 1) × d. For example, 500 values separated by a three-character delimiter add 1,497 delimiter characters. Empty values and the ignore_empty setting affect how many separators are needed.
Other details can make an estimate less obvious. A cell may contain a line break, spaces at the end, or text returned by another formula. Numbers and dates can be converted to text during concatenation, and their resulting text may not look exactly like the cell’s number format. If a date must have a particular appearance, convert it deliberately with TEXT in a helper column before joining. Errors in source cells can also make the joined formula return an error rather than a text string.
The function does not stop neatly at character 32,767 and return a truncated list. When the combined result exceeds the cell limit, expect an error instead of a partial answer. That makes it important to check the output length before using the result in a report, export, or downstream formula.
How to measure a joined result
For a result comfortably below the limit, LEN can count its characters. With the words Oak, Pine, and Elm in A2:A4, this formula joins them with comma-space separators and counts the result:
=LEN(TEXTJOIN(", ",TRUE,A2:A4))
The joined text is Oak, Pine, Elm, which is 14 characters: 3 + 2 + 4 + 2 + 3. LEN returns 14. This is a useful check because it counts the delimiters as well as the words. If the TEXTJOIN inside LEN itself exceeds the cell limit, however, LEN cannot rescue it: the inner function errors before LEN can count anything.
For very long inputs, estimate in smaller groups instead of trying to create the over-limit result as an intermediate value. You can count source text lengths and separator lengths in helper columns or smaller subtotals, then use those totals to decide how to divide the output. Check what happens when empty cells are included or skipped, and account for line breaks or other multi-character separators.
Useful examples and separator choices
For a simple comma-separated list, with product names in A2:A6, use:
=TEXTJOIN(", ",TRUE,A2:A6)
For a line-separated list with the same layout, use a line-feed delimiter:
=TEXTJOIN(CHAR(10),TRUE,A2:A6)
Turn on Home > Wrap Text for the result cell if you want those line breaks to display on separate lines. On Windows, Alt+Enter inserts a line break while editing a cell; on Mac, the equivalent is Control+Option+Return. A formula using CHAR(10) inserts line-feed characters into its result; wrapping controls how they appear in the grid, not how many characters the result contains.
Choose a delimiter that makes the output useful and easy to parse. A comma is readable, but it may be ambiguous if the values themselves contain commas. A tab or line break may suit a report, while a carefully chosen marker can help with later splitting. Regardless of the choice, delimiters count toward the 32,767-character maximum. TEXTJOIN does not automatically quote or escape values containing the delimiter.
What to do when the result is too long
There is no worksheet setting, formula option, or larger TEXTJOIN variant that increases the per-cell character ceiling. Select a remedy based on what the joined text is for:
- Keep separate parts in separate cells. Join smaller groups in different output cells, each below the limit. This is the safest option when the full text must remain available in the workbook.
- Reduce unnecessary characters. Remove redundant spaces, repeated labels, or verbose separators if doing so preserves the meaning. Be careful not to discard meaningful source text.
- Use a more suitable data structure. If the result is a long collection of records, keeping one record per row is often easier to filter, sort, validate, and export than putting everything into one cell.
- Export or process the text outside a single cell. If a downstream system requires one very long string, use an appropriate file or data-processing workflow rather than trying to store an over-limit string in a worksheet cell.
Breaking the result into several cells changes how a consumer uses it: a recipient will need to read multiple cells or combine them outside Excel. Do not assume that joining those pieces in one more formula solves the problem; if that final cell would exceed 32,767 characters, it will hit the same limit.
Common errors and version compatibility
If TEXTJOIN returns #VALUE!, an overlong result is one likely cause, but it is not the only possible cause. Check whether any source cell already contains an error, whether the formula’s arguments are arranged correctly, and whether the joined text would exceed the cap. A formula that works after shortening a range or changing the delimiter may point to an output-length problem; a source error needs to be fixed or handled separately.
TEXTJOIN is available in Excel 2019 and later, including Microsoft 365, Excel 2021, and Excel 2024. It is also available in current Excel for the web. Older desktop versions that do not support it may display an unsupported-function indicator such as _xlfn.TEXTJOIN or return #NAME?. If a workbook is shared with people using older Excel, confirm their version before relying on this function. The character limit itself is a worksheet cell limit, not a Windows-only setting; the same basic constraint applies on Mac and in Excel for the web.
A related misconception is that the 252 text-argument maximum means TEXTJOIN can combine only 252 cells. It can take a range as an argument, so a single range can contain many more cells. Conversely, having only a few arguments does not avoid the character cap: a few very long input strings can still produce an over-limit result.
Frequently Asked Questions
What is the maximum number of characters for TEXTJOIN in Excel?
The maximum result that can be stored in one cell is 32,767 characters. The count includes joined values and inserted delimiters. If the combined result exceeds that amount, TEXTJOIN returns #VALUE!.
Can I increase the TEXTJOIN character limit?
No. Excel does not provide a setting or TEXTJOIN argument to raise the cell-content limit. Keep a longer result in multiple cells or process it in a format that supports the required length.
Does the delimiter count toward the TEXTJOIN limit?
Yes. Every inserted delimiter character counts, including spaces and punctuation. A delimiter is placed between included values, so its contribution depends on how many values are actually joined.
Does TEXTJOIN’s 252-argument limit mean it can join only 252 cells?
No. A range such as A2:A1000 is one text argument, even though it refers to many cells. The 252 limit is about the number of text arguments supplied to the function, not the number of cells inside a range.
Why does TEXTJOIN return #VALUE! when the formula looks correct?
The combined text may be longer than 32,767 characters, or an input may contain an error. Check the source values and estimate the value-plus-delimiter length. If the output is too long, divide it into separate cells rather than trying to display the entire result in one cell.
Related
- Find and Replace in Excel: Select Data First
- Compare Two Columns of Names in Excel: Find Matches
- Excel Table Styles: How to Apply and Customize Them
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- How to Copy a Formula Across an Entire Row in ExcelTo copy a formula across a row in Excel, enter it in the leftmost cell, select that cell…
- Excel Sum Between Dates: SUMIFS Formulas and ExamplesIf dates are in A2:A100, amounts are in B2:B100, and the start and end dates are in E2…
- Excel Function Keys: What F1–F12 DoIn Excel for Microsoft 365 on Windows, the function keys F1–F12 open Help, edit cells, repeat actions, move…
- Excel A to Z Formula: How to Sort DataWith the values to sort in A2:A20 and an empty output area beginning at C2, enter =SORT(A2:A20) in…
- Excel Power Query vs Formulas: Which Should You Use?Use Excel formulas when you want calculations to update as you edit worksheet cells; use Power Query when…
- Excel CONCAT Function Examples: Formulas and Practical TipsExcel’s CONCAT function joins text from cells and typed text into one result, such as a full name,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.