Blanks, Coercion and Error Order
Three kinds of nothing
Excel distinguishes a cell that was never written, a cell holding a zero-length text constant, and a formula that returns "". COUNTIF tells them apart:
| Cell | COUNTIF(…,"") counts it | COUNTIF(…,"=") counts it |
|---|---|---|
| Never written | Yes | Yes |
| Zero-length text constant | Yes | No |
Formula returning "" | Yes | No |
Three kinds of nothing
A2 was never written, A3 holds a zero-length text constant and A4 holds ="". Columns C and D count each cell with "" and with "=": all three match "", but only the never-written cell matches "=".
Powered by the real Formulon engine (WASM) — it runs entirely in your browser, nothing is uploaded.
CELL("contents")of a blank cell is still a blank. WithA1empty,=ISBLANK(CELL("contents",A1))isTRUE,LENof it is0and&""gives"", although=CELL("contents",A1)alone shows0.- An empty delimiter is refused rather than ignored:
=TEXTSPLIT("a,b","")is#VALUE!, as is aTEXTSPLITwith neither a column nor a row delimiter. A row delimiter alone splits the text into a column.
Text read as a logical value or a number
IFaccepts the text"TRUE"but not" TRUE ";ANDtrims the spaces and accepts it.SUMrejects"TRUE"typed as an argument.TRUE=1isFALSE: a logical value and a number are never equal.- A logical value in a matrix is not read as 1 or 0.
MMULT,MINVERSE,MDETERM,LINEST,LOGEST,TRENDandGROWTHreturn#VALUE!when a range they treat as a matrix holdsTRUEorFALSE. - Under the Japanese profile,
VALUEaccepts a leading¥but not a trailing円. VALUEand text-to-number coercion reject a grouped number only when its first group is all zeros:046.565.118parses inde-DEand043,472inen-US, while000.509inde-DEand0,123inen-USare#VALUE!.
Which error wins
When several arguments fail, the result is the error of the first one the function checks, in Excel's order. The order is not the same for every function:
| Check order | Functions | Example |
|---|---|---|
| From the first argument | Most functions | =FLOOR("x",1/0) is #VALUE!, for the text, not #DIV/0!. |
| From the last argument | DELTA, GESTEP, RANDBETWEEN, VALUETOTEXT and the base conversions such as DEC2BIN and HEX2OCT | =DELTA(1/0,"x") is #VALUE!. |
| Single-value arguments before the cells of an array or range argument | LARGE, SMALL, PERCENTILE, QUARTILE, TRIMMEAN, PERCENTRANK, IRR, MIRR, TEXTJOIN | In LARGE(A1:A3,"x") the failing k wins over an error cell in A1:A3. |
| A one-cell data argument before the options | SORT, SORTBY, UNIQUE, EXPAND, WRAPCOLS, WRAPROWS, GROUPBY, PIVOTBY, T.TEST, TTEST | An error cell inside a multi-cell data argument still ranks after the options. |
| A computed array before a bad format | ARRAYTOTEXT | |
| By position across values and timeline, the value first at the same position | FORECAST.ETS and its siblings | |
| Cell by cell, in position order, inside a range too | GCD and LCM, which read every value as given | With A2 = "x" and B2 = =1/0, =GCD(A2:B2) is #VALUE!; swap the two cells and it is #DIV/0! (golden: range_raw_order). |
With =1/0, =NA() and 5 in A1:A3, =VALUETOTEXT(A1) returns #DIV/0!, while =ARRAYTOTEXT(A1:A3) writes the errors as text: #DIV/0!, #N/A, 5.
Which error wins
GCD reads cell by cell in position order: with "x" before 1/0 in row 1 it returns #VALUE!, and with the two swapped in row 3 it returns #DIV/0!. In A5:A7, VALUETOTEXT(A5) returns the error #DIV/0!, while ARRAYTOTEXT writes all three as text.
Powered by the real Formulon engine (WASM) — it runs entirely in your browser, nothing is uploaded.
Union references
GCD, LCM, MULTINOMIAL, IMSUM, IMPRODUCT, CONCAT and the text arguments of TEXTJOIN return #VALUE! for a parenthesised union such as (A1:A2,C1:C2), even a union of one area with itself. SUM, COUNT and AND read every area of a union. A union returned by LET is the same reference, so SUM(LET(u,(A1,B1),u)) sums both cells and GCD refuses it.
Checked against Excel
The Excel column was captured from a real Excel build. The Formulon column is what the WASM engine in this page returns for the same formula under the same profile.
Powered by the real Formulon engine (WASM) — it runs entirely in your browser, nothing is uploaded.
Read next
- Text by locale and host — when two strings match under each profile.
- Error model — every error value and status the engine returns.