How to Use LAMBDA Function in Excel + Tips
Learn how to use LAMBDA function in Excel step-by-step to define variables in formulas with simple examples, benefits, and tips.
Hello everyone! Today I show you how to use LAMBDA function in Microsoft Excel 365 and Excel 2024+ step by step with simple example.
You ever want make your own custom formula in Excel? Like you make your own tool that you can use again and again? That is what LAMBDA do! It let you build your own function, give it a name, and use it anywhere in your workbook. Sound hard? No worry, I explain step by step, very easy!
1. What is LAMBDA Function in Excel?
LAMBDA function let you create your own custom formula inside Excel. Before LAMBDA exist, if you want make custom formula, you need use VBA — very hard for normal people. But now with LAMBDA, you can make custom formula with normal Excel formula style, no VBA need!
Think of LAMBDA like you teach Excel a new skill. You say: "Hey Excel, from now on, when I type this name, do this calculation for me." Excel will remember and do it every time!
Why LAMBDA is useful:
- No more repeat formula — Write once, use many time
- Clean and easy to read — No more long messy formula
- Easy to change — If you want update, change in one place only
📚 Related Tutorial: Want to store variable inside formula? Check out How to Use LET Function in Excel!
2. Formula Syntax & Parameters
=LAMBDA([parameter1, parameter2, ...], calculation)
parameter1, parameter2, ...— Optional. The input name you give, likex,y, orprice,qty. This is like variable name.calculation— Required. What you want Excel to calculate using your parameter.
Important: LAMBDA alone in a cell just define the function. To actually use it and get result, you must:
- Call it right away by add
(value)at the end, OR - Save it as Named Formula in Name Manager — this is the best way!
3. Practical Examples
Example 1: Simple Add Two Number
You want make custom formula that add two number together. Type this in a cell to test:
=LAMBDA(x, y, x + y)(10, 20)
👉 Result: 30
The (10, 20) at the end is where you pass your real value. x become 10 and y become 20, then Excel calculate 10 + 20 = 30.
Example 2: Calculate Price After Discount (Save as Named Formula)
This is real use case! You want make custom formula call CalcDiscount that take price and discount rate, then return final price.
Step 1: Go to Formulas tab → click Name Manager → click New
Step 2: In the Name box, type: CalcDiscount
Step 3: In the Refers to box, type:
=LAMBDA(price, discount, price - (price * discount))
Step 4: Click OK and close Name Manager.
Now you can use it like normal Excel formula!
=CalcDiscount(1000, 0.1)
👉 Result: 900 (1000 price minus 10% discount = 900)
Very clean right? Now you use CalcDiscount anywhere in your workbook!
Example 3: Calculate Tax Amount
Make a custom formula CalcTax that calculate tax:
=LAMBDA(amount, taxRate, amount * taxRate)
Save it in Name Manager as CalcTax, then use:
=CalcTax(5000, 0.15)
👉 Result: 750 (tax amount is 750 from 5000 with 15% tax rate)
💡 Tip: You can combine LAMBDA with LET together! Use LET inside LAMBDA to make your custom formula even cleaner. Example:
=LAMBDA(price, qty, LET(subtotal, price*qty, subtotal * 0.9))— this calculate subtotal first, then apply 10% discount.
4. LAMBDA vs Normal Formula — What is Difference?
| Normal Formula | LAMBDA | |
|---|---|---|
| Can reuse? | Must retype every time | Define once, use anywhere |
| Easy to update? | Must change every cell | Change in one place only |
| Can give custom name? | No | Yes, via Name Manager |
| Need VBA? | No | No |
| Work on old Excel? | Yes | No (365/2021 only) |
💡 Quick Tips for Using LAMBDA Function
- Always save in Name Manager: Don't just type LAMBDA in a cell — save it with a good name in Name Manager so you can use it everywhere in your workbook.
- Give clear parameter name: Use meaningful name like
price,qty,taxRateinstead of justx,y. Much easier to understand later. - Test first before save: Before save to Name Manager, test your LAMBDA in a cell with
=LAMBDA(x, y, ...)(value1, value2)format to make sure result is correct. - Excel Version Requirement: LAMBDA function require Microsoft 365 or Excel 2021 or newer. Old Excel version not support this.
📚 Related Resources & Tutorials
Related Tutorials
Opens in new tab ↗How to Use LET Function in Excel + Tips
Learn how to use LET function in Excel step-by-step to define variables in formulas with simple examples, benefits, and tips.
How to Use SCAN Function in Excel + Tips
Learn how to use SCAN function in Excel step-by-step to calculate running totals, cumulative sums, and fill blank cells with easy examples and tips.
How to Use MAP Function in Excel + Tips
Learn how to use MAP function in Excel step-by-step to apply formula to each item in array with simple examples, tips.