LET
assigns names to values in a formula · from excel · excel: verified match · sheets: verified match
signature
LET(name1, name_value1, calculation_or_more…)
returns: any
| argument | required |
|---|---|
| name1 | required |
| name_value1 | required |
| calculation_or_more… | required |
examples
formula and result, taken from the engine's own test suite — every result below is asserted in CI, not written by hand.
fx
=LET(x, 2, x * 10) 20 errors
error values observed from the engine — each with a call that produces it.
| error | produced by |
|---|---|
| #ERROR! | =LET(x,1,x,2,x) |
related
- ARRAY_CONSTRAIN truncates a range to at most the given rows and columns
- ARRAYFORMULA evaluates an expression across a range (this engine already spills, so it is a pass-through for sheets compatibility)
- ARRAYTOTEXT converts array to text representation
- BYCOL applies lambda to each column of array
- BYROW applies lambda to each row of array
- CHOOSECOLS returns the specified columns from an array