Save a Reusable LAMBDA Formula in Excel
Question details
Save a complex Excel formula as a named LAMBDA function that can be reused without VBA.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A user wants to define a custom function with parameters and call it from worksheet cells.
- Observed behavior
- The desired result is a named LAMBDA function that can be reused like a built-in Excel function.
Make sure your Excel version supports the LAMBDA function, then identify the inputs your formula needs. Open the workbook where you want to store the function.
Create a named LAMBDA function in Excel Name Manager
Use Name Manager to store a formula with parameters and call it throughout the workbook.
In Excel, select Formulas > Name Manager, then select New.
Enter a name such as CategoryTotal in the Name box. Select Workbook as the scope to make the function available throughout the workbook.
In Refers to, enter =LAMBDA(dates,categories,amounts,start_date,end_date,category,SUMIFS(amounts,dates,">="&start_date,dates,"<="&end_date,categories,category)), then select OK. This example sums amounts that match a category and date range.
In a worksheet cell, enter =CategoryTotal(A2:A100,B2:B100,C2:C100,DATE(2025,1,1),DATE(2025,12,31),"Travel"), adjusting the ranges and criteria to match your data.

Work with Excel spreadsheets in WPS Office
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and Excel file compatibility, making it easy to move everyday spreadsheet work between applications. It does not change Excel's LAMBDA version requirements; check formula compatibility before relying on a named LAMBDA in WPS.

Frequently Asked Questions
Do I need VBA to create a LAMBDA function?
No. In a supported version of Excel, use Formulas > Name Manager > New to save a LAMBDA formula as a named function.
Can I use my named LAMBDA on another worksheet?
Yes. Choose Workbook as the scope when creating the name in Name Manager, and you can call it from worksheets in that workbook.
Why does a LAMBDA formula show a #CALC! error in a cell?
A LAMBDA entered directly in a cell must be called with arguments. Add arguments after the definition, or save it in Name Manager and call the saved name from a cell.
Will my named LAMBDA work in every spreadsheet application?
Not necessarily. The application and version must support LAMBDA and the functions used inside it. Check compatibility before sharing or editing the workbook elsewhere.




