Table of Contents
Excel's LAMBDA function lets you turn a formula into a reusable function with a meaningful name. You define its inputs and calculation, test it in a cell, then save the definition as a name in the workbook. No VBA macro is required.
LAMBDA is supported in Excel for Microsoft 365 and Excel 2024, including their Mac versions. Check that collaborators use a compatible version before relying on it in a shared workbook.
1. Test a simple LAMBDA in a cell

=LAMBDA(number,number*3)(5)
This returns 15. The parameter number receives 5, and the calculation multiplies it by 3. The parentheses at the end call the function immediately so you can test it.
The general structure is:
=LAMBDA(parameter1,parameter2,calculation)(value1,value2)
The calculation is the final argument in the LAMBDA definition. Give parameters meaningful names and pass the same number of values when calling the function. A definition entered in a cell without a call normally returns #CALC!.

2. Save the definition as TRIPLE
- In Excel for Windows, open Formulas > Name Manager > New. On Mac, use Formulas > Define Name.
- Enter TRIPLE as the name and choose Workbook scope if you want to use it throughout the file.
- In Refers to, enter the definition below, without the test call at the end.
- Add a short comment describing the input and result, then save the name.
=LAMBDA(number,number*3)

Now enter =TRIPLE(10) in a cell; it returns 30. You can pass a cell reference, such as =TRIPLE(A2), to reuse the function with worksheet data.
The name belongs to this workbook. Creating it does not automatically install the function in every other Excel file. Keep its definition and purpose documented for people who inherit the workbook.
3. Build a reusable grading calculation
For an illustrative grading scale, use A for scores of at least 90, B for at least 80, C for at least 70, D for at least 60, and F below 60. These thresholds are an example, not a universal grading policy.
First check the calculation in a cell, then create a workbook name called LETTERGRADE with this definition:
=LAMBDA(score,IF(NOT(ISNUMBER(score)),"Check score",IF(OR(score<0,score>100),"Check score",IFS(score>=90,"A",score>=80,"B",score>=70,"C",score>=60,"D",TRUE,"F"))))
=LETTERGRADE(85) returns B. The numeric and range checks prevent text or a score outside 0–100 from silently receiving a grade.
| Call | Expected result |
|---|---|
| =LETTERGRADE(90) | A |
| =LETTERGRADE(80) | B |
| =LETTERGRADE(59) | F |
| =LETTERGRADE(101) | Check score |
| =LETTERGRADE("85") | Check score, because the input is text. |
Test the boundaries as well as an ordinary score. If your grading policy changes, update the definition and recheck the worksheet results. TipsMake's guide to newer Excel functions includes the IFS structure used here.
When LAMBDA helps—and when to keep the formula visible

A named function helps when the same calculation appears in many places or needs a consistent rule. It does not automatically make a calculation faster or correct. A short one-off formula may be easier to read directly in the cell.
You can also pass LAMBDA expressions to helper functions, such as REDUCE for accumulated calculations. Check support for each helper separately; a version that supports LAMBDA may not support every related function.
Troubleshooting
- #CALC!: Add the test call to an in-cell definition, or save the definition as a name and call that name.
- #VALUE!: Check the number and type of supplied arguments.
- #NAME?: Check compatibility, spelling, and the name's scope.
- Unexpected results: Test the underlying formula with ordinary, blank, and boundary inputs before naming it.
Use Microsoft’s LAMBDA reference for naming rules and supported interfaces. Formula separators can differ with regional settings.

Reader Comments 0
Sign in with email or Google to join the discussion.