Skip to content

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:

CellCOUNTIF(…,"") counts itCOUNTIF(…,"=") counts it
Never writtenYesYes
Zero-length text constantYesNo
Formula returning ""YesNo

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. With A1 empty, =ISBLANK(CELL("contents",A1)) is TRUE, LEN of it is 0 and &"" gives "", although =CELL("contents",A1) alone shows 0.
  • An empty delimiter is refused rather than ignored: =TEXTSPLIT("a,b","") is #VALUE!, as is a TEXTSPLIT with 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 ​

  • IF accepts the text "TRUE" but not " TRUE "; AND trims the spaces and accepts it. SUM rejects "TRUE" typed as an argument.
  • TRUE=1 is FALSE: 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, TREND and GROWTH return #VALUE! when a range they treat as a matrix holds TRUE or FALSE.
  • Under the Japanese profile, VALUE accepts a leading ¥ but not a trailing 円.
  • VALUE and text-to-number coercion reject a grouped number only when its first group is all zeros: 046.565.118 parses in de-DE and 043,472 in en-US, while 000.509 in de-DE and 0,123 in en-US are #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 orderFunctionsExample
From the first argumentMost functions=FLOOR("x",1/0) is #VALUE!, for the text, not #DIV/0!.
From the last argumentDELTA, 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 argumentLARGE, SMALL, PERCENTILE, QUARTILE, TRIMMEAN, PERCENTRANK, IRR, MIRR, TEXTJOINIn LARGE(A1:A3,"x") the failing k wins over an error cell in A1:A3.
A one-cell data argument before the optionsSORT, SORTBY, UNIQUE, EXPAND, WRAPCOLS, WRAPROWS, GROUPBY, PIVOTBY, T.TEST, TTESTAn error cell inside a multi-cell data argument still ranks after the options.
A computed array before a bad formatARRAYTOTEXT
By position across values and timeline, the value first at the same positionFORECAST.ETS and its siblings
Cell by cell, in position order, inside a range tooGCD and LCM, which read every value as givenWith 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.