Contact

Numbers LAMBDA: Define Local Formulas and Test Them with LAMBDA.APPLY

Logical and Information Intermediate Apple Numbers

Create a local LAMBDA in Apple Numbers, test one or more parameters, verify row calculations and understand cell-local scope and import limits.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

LAMBDA defines a subformula whose named parameters receive inputs. In Numbers, use LAMBDA.APPLY to test it and return a value. For example, =LAMBDA.APPLY(68,LAMBDA(temp,(temp-32)*5/9)) gives 20, converting 68 °F to 20 °C.

Apple’s local-definition rules matter: a Numbers LAMBDA can be used and referenced only in its defining cell, and LAMBDA functions cannot be nested. Do not assume a workbook-wide named-function workflow from another spreadsheet.

Availability and version history

  • Introduced: Added in Numbers 14.4 for Mac and iPad.
  • Availability: Currently documented in Apple’s Functions Help 15.4 documentation edition; no final supported-version endpoint is established.
  • Scope: Shared iWork function reference. Historical iPhone and iCloud availability and exact client parity are unverified.
  • Checked: October 14, 2026, against the official LAMBDA reference. Examples were independently calculated; no native Numbers test was performed.

Syntax and the required final calculation

LAMBDA(parameter, parameter…, calculation)

The official LAMBDA entry allows up to 253 parameters. The calculation is required and must come last. Parameter names become formula tokens used inside the expression; the values passed through LAMBDA.APPLY supply their inputs.

A bare definition such as =LAMBDA(temp,(temp-32)*5/9) entered alone in a cell returns an error according to Apple. Defining the expression is not the same as applying it to a value. The entry does not name that error token, so this guide does not invent one.

The wrapper follows Numbers’ documented syntax:

=LAMBDA.APPLY(input,LAMBDA(parameter,calculation))

LAMBDA.APPLY must receive a LAMBDA definition after its test value or values. Optional parameter handling is a separate question; do not silently treat an omitted input as numeric zero.

Temperature conversion with a direct arithmetic control

Create TemperatureCheck, with five columns A:E and nine rows, including one header row. Put Fahrenheit, LAMBDA Celsius, Direct Celsius, Difference and Reconstructed Fahrenheit in A1:E1. Enter -40,0,32,68,70,104,212 down A2:A8.

In B2 enter =LAMBDA.APPLY(A2,LAMBDA(temp,(temp-32)*5/9)) and fill through B8. In C2 enter =(A2-32)*5/9 and fill through C8. In D2 enter =B2-C2 and fill through D8. In E2 enter =B2*9/5+32 and fill through E8.

Row A: Fahrenheit Expected B and C Mathematical D Mathematical E
2 -40 -40 0 -40
3 0 -17.7777777778, approximately 0 0
4 32 0 0 32
5 68 20 0 68
6 70 21.1111111111, approximately 0 70
7 104 40 0 104
8 212 100 0 212

The parameter temp is bound to each row’s A input. It is not a reference to a separate cell named temp. The inverse column uses the full B result; typing the ten-decimal display back into a cell changes the reconstruction.

Copying the formula supplies a definition in each destination cell. Changing one copy does not establish a shared workbook function that updates every copy. Keep a documented formula pattern when several cells are meant to implement the same rule.

More than one parameter: order matters

Create AreaChecks, with five columns A:E and seven rows. Put numeric widths 2,3.5,0,8 in A2:A5 and matching heights 5,4,9,1.25 in B2:B5. In C2 enter =LAMBDA.APPLY(A2,B2,LAMBDA(width,height,width*height)) and fill through C5. Expect 10,14,0,10 square units.

In D2 enter =A2*B2 and fill through D5. In E2 enter =C2-D2 and fill through E5 for mathematical zeros. Width and height must use the same length unit before interpreting square units; the function does not convert units for you.

Multiplication is symmetric, so reversing those inputs would conceal an order mistake. Use a non-symmetric control: in C7 enter =LAMBDA.APPLY(9,4,LAMBDA(first,second,first-second)) for 5. In D7 enter =LAMBDA.APPLY(4,9,LAMBDA(first,second,first-second)) for -5. Pair supplied values with parameters in their intended order.

Advanced: apply one expression to each row of a matrix

Apple separately documents BYROW as applying a LAMBDA to each row. Create RowTotals, with six columns A:F and six rows. Enter this numeric grid in A2:C4:

Row A B C
2 2 3 5
3 4 0 6
4 -1 7 2

Put indices 1,2,3 in E2:E4. In F2 enter =INDEX(BYROW($A$2:$C$4,LAMBDA(rowdata,SUM(rowdata))),E2,1) and fill through F4. The expected outputs are 10,10,8.

INDEX extracts one scalar result from the returned array, following Apple’s INDEX contract. This gives every output an explicit cell without assuming a native spill layout. In D2 enter =SUM(A2:C2) and fill through D4 for the same three row totals.

There is one LAMBDA definition inside BYROW, not a LAMBDA inside another LAMBDA. The row parameter represents the current row supplied by BYROW. It does not select the entire matrix each time. Keep the input range anchored when filling the scalar extraction formula.

Import, local scope and errors

Apple states that importing an Excel workbook containing LAMBDA functions gives each referencing formula a local copy of the definition. Its LAMBDA.APPLY reference describes conversion between Numbers’ test wrapper and Excel’s parenthesized testing syntax on import/export. These are documented conversion rules, not a round-trip test of a particular file.

A bare definition, a missing final calculation or nested LAMBDA definitions is outside the demonstrated valid pattern. Apple explicitly prohibits nesting LAMBDA functions; it does not provide a complete error-code catalogue for every invalid parameter name or count. For omitted-value handling, consult ISOMITTED’s official example.

References, regional settings and limits

These examples use numeric cells, English function names, decimal points and comma-separated arguments. If your decimal separator is a comma, Apple’s functions overview specifies semicolons between arguments. Keep quoted text inside straight double quotation marks when entering the formula.

For a reference to another Numbers table, select the intended cell while editing the formula so Numbers inserts its qualified reference, such as TableName::B2. Do not confuse a local parameter or variable token with a worksheet address. The examples specify complete tables and use separate output columns.

Exact malformed-name errors, numeric-text conversion, extreme-value precision, evaluation timing and cross-client workbook round trips are outside these demonstrated cases. Independently exact arithmetic targets can differ slightly from a displayed spreadsheet result because of finite precision.

Use LAMBDA.APPLY to test the definition and LET to name values inside an expression. SUM provides the row arithmetic; INDEX extracts the specified array result.