Skip to content
ExcelExcel 2024+

LAMBDA function in Excel

Create custom, reusable and call them by a friendly name

=LAMBDA([parameter1, parameter2,, ] calculation)

LAMBDA syntax and parameters

Three arguments, one required.

  • parameter1anyOptional

    A value that you want to pass to the function, such as a cell reference, string or number. You can enter up to 253 parameters. This argument is optional.

  • parameter2anyRepeating
  • calculationanyRequired

    The formula you want to execute and return as the result of the function. It must be the last argument and it must return a result. This argument is required.

LAMBDA examples

Formulas you'll actually reuse.

  1. Define a reusable discount calculation and call it immediately:

    =LAMBDA(price, qty, price * qty * 0.9)(B2, C2)

    Result224.10

  2. Clamp a whole column at zero by mapping a LAMBDA over it:

    =MAP(B2:B13, LAMBDA(x, MAX(x, 0)))

LAMBDA in Google Sheets

Same name — your formula ports as-is.

Try LAMBDA in the playground

Edit the example — nothing to install.

Preloaded with the LAMBDA formula from Example 1 — change anything and watch it respond.

Loading the editor…

LAMBDA errors

What they mean — and the fixes.

  • #CALC!

    The LAMBDA was entered without being called — add an argument list after the closing parenthesis, or pass it to MAP/BYROW.