Excel LAMBDA Function

If you just need to excel lambda function and move on, the boxed answer at the top is all you need. The rest of this page is for when you want to understand why it works in Excel, adapt it to a trickier version, or make it robust enough to hand to a colleague. We keep the opening short on purpose — the depth is here when you want it, not in your way when you don’t.

Exact answer

In Excel: use =LAMBDA(parameters, calculation) — defined in Name Manager it becomes a reusable custom function you can call by name, with no VBA. Function availability: LAMBDA: Excel 2024+. These are Microsoft's version markers; earlier perpetual releases do not include these functions. Check the actual product and update channel before using the formula. A marker does not establish an identical Web/Mac workflow or Google Sheets support.

On this page8

Syntax

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

Arguments

Argumentrequired / optionalDescription
parameter1requiredA name for the first input the function will accept.
calculationrequiredThe expression to evaluate, using the parameter names.

Related functions

LETIFSSWITCH
▤Annotated stepsExcel
1

Function availability: LAMBDA: Excel 2024+. These are Microsoft's version markers; earlier perpetual releases do not include these functions. Check the actual product and update channel before using the formula. A marker does not establish an identical Web/Mac workflow or Google Sheets support.

2

Build and test the formula normally in a cell until it returns the right answer.

3

Replace the cell references with parameter names inside a LAMBDA wrapper and test it inline with trailing arguments.

4

Open Formulas → Name Manager, create a new name, and paste the LAMBDA as its definition.

5

Call it by that name anywhere in the workbook, as you would a built-in function.

Ctrl+CthenCtrl+Shift+V⌘+Cthen⌘+Ctrl+VPaste values · WindowsMac

What this does

LAMBDA lets you define your own function in the formula language itself. On its own in a cell it is not much use; the point is to save it in Name Manager under a name, after which that name works like any built-in function throughout the workbook. That turns a gnarly formula pasted into forty places into one definition with one place to fix. It also means custom logic can ship in a macro-free .xlsx, which VBA never allowed. Combined with the helper functions MAP, REDUCE and SCAN it can iterate over arrays. Requires Excel 365. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “excel lambda function”. Start on a copy or a tiny sample, keep the affected formula visible, and compare the result with the outcome you expected before you touch the real workbook. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. The point is a calculation you can defend to a CFO or an auditor, but the practical win is that someone else can open the file and understand what happened without asking you.

A worked example

A margin calculation used across a workbook: define =LAMBDA(price, cost, (price-cost)/price) in Name Manager as MARGIN, then write =MARGIN(B2, C2) in any cell. To test it before naming it, call it inline: =LAMBDA(price, cost, (price-cost)/price)(100, 62) returns 0.38. LAMBDA turns a copy-pasted formula into a defined function with one place to fix, which is the first real answer Excel has had to formula duplication. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.

In Google Sheets

Function availability: LAMBDA: Excel 2024+. These are Microsoft's version markers; earlier perpetual releases do not include these functions. Check the actual product and update channel before using the formula. A marker does not establish an identical Web/Mac workflow or Google Sheets support. Nothing on this page is behind a login or a download: the exact answer is at the top, and the detail below it is there for when you need it. That is the whole promise here — the answer first, and just enough context to make it stick. For “excel lambda function”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.

Common mistakes

  • Leaving a bare LAMBDA in a cell without calling it, which returns #CALC!.
  • Referencing a cell directly inside the LAMBDA instead of passing it as a parameter, which defeats the reusability.
  • Sharing the workbook with users on older Excel, where every call returns #NAME?.

Frequently asked questions

How do I make a custom function without VBA?

Write it as a LAMBDA and save it in Name Manager. It then works like a built-in and needs no macro-enabled file format.

Why does my LAMBDA return #CALC!?

It is defined but never called. Either add arguments in trailing brackets, or name it and call it by name.

Can a LAMBDA loop?

Yes, through the helper functions MAP, REDUCE, SCAN, BYROW and BYCOL, and by calling itself recursively once it is named.

Which Excel release does this formula require?

Function availability: LAMBDA: Excel 2024+. These are Microsoft's version markers; earlier perpetual releases do not include these functions. Check the actual product and update channel before using the formula. A marker does not establish an identical Web/Mac workflow or Google Sheets support.