We’re improving Formula Genius. We’re redesigning the app and fixing issues along the way. Sorry for any disruption, and thank you for your patience.
Excel advanced

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

Prompt

"Create a reusable function that converts Celsius to Fahrenheit"

Excel
=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

  1. LAMBDA() creates a function object with parameters and a calculation
  2. celsius is the parameter name — you choose any name
  3. celsius * 9/5 + 32 is the formula body that runs when called
  4. Save in Name Manager to create a reusable named function
  5. 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

Prompt

"=TOFAHRENHEIT(0)"

Excel
32
Prompt

"=TOFAHRENHEIT(100)"

Excel
212
Prompt

"=TOFAHRENHEIT(-40)"

Excel
-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.