Text functions
CONCAT
Known larger differences on 5 of 63 recorded answers
Of 63 recorded answers (20 in the answer bank and 43 workbook cells), 5 do not match: 5 differ in kind or value. How we measure this · See the Rust code
Local names in 40 languages
| Language | Name in Excel |
|---|---|
| Arabic | CONCAT |
| Bulgarian | CONCAT |
| Czech | CONCAT |
| Danish | SAMMENKÆDNING |
| German | CONCAT |
| Greek | CONCAT |
| English (Australia) | CONCAT |
| English (United Kingdom) | CONCAT |
| English (United States) | CONCAT |
| Spanish | CONCAT |
| Estonian | CONCAT |
| Finnish | YHDISTÄ |
| French | CONCAT |
| Hebrew | CONCAT |
| Croatian | CONCAT |
| Hungarian | FŰZ |
| Indonesian | CONCAT |
| Italian | CONCAT |
| Japanese | CONCAT |
| Korean | CONCAT |
| Lithuanian | CONCAT |
| Latvian | CONCAT |
| Norwegian | CONCAT |
| Dutch | TEKST.SAMENV |
| Polish | ZŁĄCZ.TEKST |
| Portuguese (Brazil) | CONCAT |
| Portuguese (Portugal) | CONCAT |
| Romanian | CONCAT |
| Russian | СЦЕП |
| Slovak | CONCAT |
| Slovenian | CONCAT |
| Serbian (Latin) | CONCAT |
| Swedish | SAMMAN |
| Thai | CONCAT |
| Turkish | ARALIKBİRLEŞTİR |
| Ukrainian | CONCAT |
| Vietnamese | CONCAT |
| Chinese (Simplified) | CONCAT |
| Chinese (Hong Kong) | CONCAT |
| Chinese (Traditional) | CONCAT |
Names from Microsoft's support site.
What it does
CONCAT(text1, [text2], ...)
CONCAT joins text end to end and returns the result as one text value. Nothing is inserted
between the pieces, nothing is skipped, and the order is the order the arguments are written.
The property that makes it a new function rather than a rename of CONCATENATE is how it
consumes a range. CONCAT flattens a multi-cell argument and joins every cell in it;
CONCATENATE does not accept one. CONCAT(A1:A3) is a legal, meaningful call.
Stated as an operation: let each argument be expanded to a sequence of scalar values — an array
or range expands in row-major order, a scalar expands to itself — and let each scalar be
converted to text by the ordinary to-text rules. CONCAT returns the concatenation of all
those texts, in argument order, with the expansions inlined in place. Empty cells contribute
empty text, which is the same as contributing nothing.
Microsoft's article states the replacement relationship plainly: CONCAT "replaces the
CONCATENATE function", though CONCATENATE remains available for backward compatibility.
Arguments
text1 — required; text2, … — optional, up to 253 text arguments in total per the article.
Each argument may be a string or an array such as a cell range.
Two argument-level points worth stating:
- The 253 limit is on argument slots, not on cells. A single range argument can
contribute far more than 253 values. This is the point readers most often get backwards when
migrating from
CONCATENATE, whose 255 slots each had to be written out.
Try it
Quirks
Result and edge cases
The return kind is Text.
- The 32,767-character cap is a real boundary, and it errors. Microsoft's article states
that a result longer than 32,767 characters returns
#VALUE!. That is the cell text limit from chapter 01, surfacing here as an error rather than as truncation — consistent with what that chapter records for the formula path generally. - Empty cells inside a range contribute nothing, so
CONCATover a sparse column silently closes the gaps. There is no way to tell afterwards how many cells were empty. - Numbers and logicals convert to text. A number contributes its General rendering, so a
value displayed as
1 234,57by a cell format contributes the unformatted digits. Wrap inTEXTwhen the rendering matters. - Reference and array arguments are resolved and expanded before conversion, per chapter 03.
Errors
#VALUE!when the joined result would exceed 32,767 characters (documented).- An error value anywhere in the input propagates
(chapter 02) — including an error sitting in one cell
of a range argument, which is the case where
CONCATdiffers most sharply from an aggregate that could choose to skip it. - A value kind with no text conversion surfaces
#VALUE!under the shared coercion rules.
How to implement
Notes for implementers
- Expansion order is part of the contract. Row-major within each argument, arguments in written order. Any other order is a different function, and the difference only shows on multi-row, multi-column ranges — which is exactly the shape casual tests omit.
- Check the length cap incrementally. A single append that crosses 32,767 must produce the error rather than a truncated string; building the whole result and testing afterwards is correct but can allocate absurdly on adversarial input.
- The cap counts UTF-16 code units, so a result made of astral characters reaches it at half the number of visible characters.
Rust code
Show the CalcFunc source of this function
Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.
CONCAT · 1 lines · calc-func/src/catalogue/text_functions.rs on GitHub29 concat_fn "CONCAT" (1, 254) [R "text1", R "text2"] |s, a, sv| { concat(s, a, sv) }
concat · 14 lines · calc-func/src/catalogue/text_functions.rs on GitHubfn concat(site: &Site<'_>, a: &[CalcValue], sv: &mut crate::call::EvalServices<'_>) -> Step<CalcValue> {
let mut joined: Vec<u16> = Vec::new();
for index in 0..a.len() {
let g = cells(site, a, index, sv)?;
for value in &g.cells {
let units = cell_text(site, index, value)?;
if joined.len() + units.len() > EXCEL_TEXT_MAX_UTF16_CODE_UNITS {
return fail(WorksheetErrorCode::Calc);
}
joined.extend_from_slice(&units);
}
}
Ok(CalcValue::text(ExcelText::from_utf16_code_units(joined)))
}
Kernels shared with other functions
Argument and result plumbing
No implementation has been published with a Handbook test suite for this function.
Version differences
No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.
Alternatives
Relationships
CONCATENATEis the functionCONCATreplaces; Microsoft retains it for workbook compatibility and its own article warns that it may not be available in future versions. The two differ in range handling, in argument limits, and — per the axis chip this page renders — in array lifting. SeeCONCATENATE.TEXTJOINis the third member of the family and the one to reach for by default: it adds the delimiter and ignore-empty arguments thatCONCATdeliberately lacks.&(FUNC.OP_CONCAT) is the operator form. For two or three scalars it is shorter and equivalent in intent; it has no range behaviour.TEXTSPLITis the modern inverse direction.
Named variants
No named variants are recorded yet.
Suggest a correction or contribute an implementation · For agents