Excel Function

Excel LAMBDA function

Build your own reusable functions using standard formulas — no VBA, no macros required.

LAMBDA lets you define a named, reusable function using regular Excel formula syntax. Once defined, your function works exactly like a built-in one — type its name, pass arguments, get a result. No VBA, no macros, no developer tools needed.

Syntax

LAMBDA([param1, param2, ...], calculation)
ArgumentWhat it means
param1, param2 optionalNames for the inputs your function will accept. Use any name that doesn't conflict with cell references (avoid A1, B2, etc.).
calculation requiredThe formula that uses your parameters and returns a result.
⚠️ LAMBDA only works when named

Writing LAMBDA directly in a cell just shows a #CALC! error — it has no inputs to work with. LAMBDA must be saved as a Named Range (Formulas → Name Manager) to be called by name from any cell.

Step-by-step: create your first LAMBDA

Let's build a function called TAXAMOUNT that calculates tax given a price and a rate.

Step 1 — Formulas → Name Manager → New. Name it TAXAMOUNT.

Step 2 — In the "Refers to" box, enter:

=LAMBDA(price, rate, price * rate)

Step 3 — Click OK. Now in any cell you can type:

=TAXAMOUNT(B2, 0.2)

This returns the tax amount for whatever is in B2 at a 20% rate. Change the price or rate and it recalculates instantly, exactly like any built-in function.

More examples

Convert Celsius to Fahrenheit

-- Name: CTOF =LAMBDA(celsius, celsius * 9/5 + 32)

Calculate commission with a threshold

-- Name: COMMISSION =LAMBDA(sales, rate, threshold, IF(sales > threshold, sales * rate, 0) )

Recursive LAMBDA — factorial

LAMBDA can call itself, enabling recursion without helper columns:

-- Name: FACTORIAL =LAMBDA(n, IF(n <= 1, 1, n * FACTORIAL(n-1)))
💡 Why LAMBDA matters

Before LAMBDA, repeating a complex formula in 50 cells meant maintaining 50 identical copies — change the logic once and you had to change it everywhere. LAMBDA means you change it once in the Name Manager and every cell using it updates automatically.

What Excel version do I need?
LAMBDA requires Excel 365 or Excel for the web. It is not available in Excel 2021 for all users, and not available in Excel 2019 or earlier.
Can I share LAMBDA functions with others?
Yes — the Named Range (including its LAMBDA definition) is saved inside the workbook file. When you share the .xlsx, anyone who opens it can use your custom functions.
Is LAMBDA the same as a VBA macro?
No. VBA macros require the Developer tab, run as code, and are blocked by many IT security policies. LAMBDA is a pure formula — it runs in the same calculation engine as SUM or IF, needs no special permissions, and works in Excel for the web where macros are blocked.

Practice LAMBDA for real

Type it in a live spreadsheet, get instant feedback. No videos, no downloads.

Start practising free →