How to create a custom LAMBDA function in Excel
In Excel for Microsoft 365 (verified 2026-10-24), test a formula such as =LAMBDA(temp, (5/9)*(temp-32))(104) in a cell. When it works, go to Formulas > Name Manager > New, give a name (for example ToCelsius), and paste the =LAMBDA(...) (without the trailing test arguments) into Refers to. After that, call =ToCelsius(A2) anywhere in the workbook.
LAMBDA needs Microsoft 365 / Excel 2024-style dynamic array Excel — older perpetual Excel without LAMBDA cannot create these functions. Keep names clear and document parameters in a README sheet.
Applies to Excel for Microsoft 365 and Excel for the web where LAMBDA is available. Name Manager scope is usually Workbook.
Test a LAMBDA then save it as a named function
Prototype in a cell
- In an empty cell, type a LAMBDA with trailing test values, for example
=LAMBDA(x, x*1.1)(100). - Confirm the result, then remove the trailing
(100)when you are ready to save the definition. - Support up to many parameters — keep the list short for readability.
Save with Name Manager
- Formulas tab → Name Manager → New.
- Name: something valid (letters, no spaces), Scope: Workbook.
- Refers to:
=LAMBDA(x, x*1.1)→ OK.
Use the function
- In a worksheet cell, enter
=YourName(A2)like any built-in function. - Fill down / spill as needed.
- Edit later via Name Manager if the logic changes.
Our take: name verbs, not formula1
ToCelsius and MarginAfterTax beat LAMBDA1 when someone else opens the file next quarter.
If it fails
- #NAME?: Excel build lacks LAMBDA, or the defined name is misspelled.
- #VALUE! / wrong result: parameter order mismatch — re-read the LAMBDA argument list.
- Name Manager missing: workbook is shared/protected oddly — try desktop Excel.
- Need recursion/advanced: see Microsoft’s LAMBDA helper functions (MAP, SCAN, etc.) after the basics work.
Frequently asked questions
What is Excel LAMBDA?
A function that lets you define custom, reusable calculations and save them as named formulas.
How do I create a LAMBDA function?
Test =LAMBDA(args, calc)(values) in a cell, then save the LAMBDA in Name Manager and call the name.
Does LAMBDA work in older Excel?
It requires Microsoft 365 / modern Excel with dynamic arrays — not classic Excel 2016 without those features.
Where are LAMBDA functions stored?
As defined names in the workbook (Name Manager), not as separate .xlam files unless you build an add-in.
LAMBDA vs VBA UDF?
LAMBDA stays in worksheet formulas without macros; VBA is more powerful but needs macro-enabled files and trust.