Excel LAMBDA: Custom Functions Without VBA
LAMBDA lets you create your own reusable functions in Excel — without writing a single line of VBA. Define it once, use it everywhere.
Formula Genius can generate a draft from a plain-English prompt. Supported formulas can be checked with sample cases; review the coverage on the result.
The formula
"Create a reusable function that converts Celsius to Fahrenheit"
=LAMBDA(celsius, celsius * 9/5 + 32)
LAMBDA defines an anonymous function with named parameters. This example takes a celsius value and returns Fahrenheit. To reuse it, save it as a named range in Name Manager (e.g., TOFAHRENHEIT), then call =TOFAHRENHEIT(100) anywhere in your workbook.
Step-by-step breakdown
- LAMBDA() creates a function object with parameters and a calculation
- celsius is the parameter name — you choose any name
- celsius * 9/5 + 32 is the formula body that runs when called
- Save in Name Manager to create a reusable named function
- Call it like any built-in function: =TOFAHRENHEIT(A1)
Edge cases & warnings
- LAMBDA by itself returns a #CALC! error — it needs to be called with arguments or saved as a named range
- Requires Excel 365 — not available in Excel 2021 or earlier
- Parameter names can't use spaces or match existing function names
- Recursive LAMBDAs are possible but have a nesting limit of ~1024 calls
Examples
"=TOFAHRENHEIT(0)"
32
"=TOFAHRENHEIT(100)"
212
"=TOFAHRENHEIT(-40)"
-40
Frequently asked questions
How do I save a LAMBDA as a reusable function?
Go to Formulas > Name Manager > New. Enter a name (e.g., TOFAHRENHEIT) and in the Refers To field, paste the LAMBDA formula. Click OK. Now use =TOFAHRENHEIT(value) anywhere.
Can LAMBDA take multiple parameters?
Yes. =LAMBDA(a, b, a + b) takes two parameters. You can have up to 253 parameters.
Can't find what you need?
Describe a formula in plain English. Formula Genius drafts and explains it, and can check supported formulas on sample cases.