Formualizer Docs
Core Concepts

Values, Coercion, and Errors

Understand runtime value types, implicit conversions, and spreadsheet-style error propagation.

Formualizer operations work over a compact set of runtime values (number, text, boolean, blank, arrays, and errors).

Coercion rules in practice

  • Numeric functions coerce text when valid (for example, "42" -> 42).
  • Invalid coercions return spreadsheet errors instead of panicking.
  • Blank handling differs by operation (arithmetic vs logical vs text).

Error propagation

  • Errors usually short-circuit the current expression branch.
  • Functions may choose to absorb or expose errors based on semantics.
  • Consistent error values make cross-binding behavior predictable.

Short examples

="1" + 2        -> 3
="x" + 2        -> #VALUE!
=IFERROR(A1, 0)  -> 0 when A1 is an error

Coercion matrix

Source \ TargetNumberTextBoolean
Numberidentity"42"nonzero → TRUE
Text (numeric)parse → numberidentity#VALUE!
Text (non-numeric)#VALUE!identity#VALUE!
Boolean TRUE1"TRUE"identity
Boolean FALSE0"FALSE"identity
Empty0""FALSE
Errorpropagatepropagatepropagate

Function-specific error behavior

Most arithmetic functions propagate errors immediately. Aggregation functions like SUM and AVERAGE skip error values in ranges by default. IFERROR and IFNA explicitly trap errors. ISERROR, ISERR, and ISNA test for errors without propagating them.

On this page