Formualizer Docs
ReferenceFunctionsLET / LAMBDA Functions

LET

LET: Binds local names to values and evaluates a final expression with those bindings.

Summary

LET introduces lexical variables using name/value pairs, then returns the last expression.

Remarks

  • Arguments must be provided as name, value pairs followed by one final calculation expression.
  • Names are resolved as local identifiers and can shadow workbook-level names.
  • Bindings are evaluated left-to-right, so later values can reference earlier bindings.
  • Invalid names or malformed arity return #VALUE!.

Examples

Bind intermediate values
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
135
Use LET with range calculations
Grid
CellValue
Formula
=
Result
Not evaluated yet.
Expected
28
Nested LET supports shadowing
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
7

FAQ

Can a LET binding reference a name defined later in the same LET?

No. LET evaluates name/value pairs left-to-right, so each binding can only use earlier bindings.

Does LET overwrite workbook or worksheet names permanently?

No. LET names are lexical and local to that formula evaluation; they only shadow outer names inside the LET expression.

Is LET itself volatile?

No. LET is deterministic unless one of its bound expressions calls a volatile function such as RAND.

Runtime metadata

Category

LET / LAMBDA

Signature

LET(<schema unavailable>)

Arity

min 3, max variadic

Caps

PURESHORT_CIRCUIT

Source

On this page