Create a Named LAMBDA Function in Excel for the Web
Question details
Create and save a reusable named LAMBDA function in an Excel workbook stored on OneDrive.

- Product
- Microsoft Excel for the Web
- Device & OS
- not provided
- Scenario
- The user wants to define a custom function once and call it by name in workbook formulas.
- Observed behavior
- The desired function is saved as a workbook name and can be used with arguments in worksheet cells.
Open the workbook from OneDrive in Excel for the Web and check whether Advanced Formula Environment is available on the Formulas tab. Choose a function name that does not conflict with an existing name or cell reference.
Create the function with Advanced Formula Environment
Use this method when Advanced Formula Environment is available in Excel for the Web.
In the OneDrive workbook, select Formulas > Advanced Formula Environment.
Select the Names tab, click the plus sign, and enter a function name such as DoubleValue. Add a description if you want.
Enter the LAMBDA parameter and definition. For example, use x as the parameter and x*2 as the calculation, then click Done.
Enter =DoubleValue(A2) in a worksheet cell and confirm that it returns twice the value in A2. Allow the OneDrive workbook to save.

Create the named LAMBDA in Excel desktop
Use Excel for Microsoft 365 on the desktop if you cannot access Advanced Formula Environment in the browser.
Work with Excel Workbooks in WPS Spreadsheet
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Excel workbooks. Its format compatibility helps with migration, but it does not configure Excel's Advanced Formula Environment; check LAMBDA support before relying on custom functions.

Frequently Asked Questions
How do I call a named LAMBDA function?
Enter its name and arguments in a worksheet cell, just like a built-in function. For example, =DoubleValue(A2) calls a function named DoubleValue with the value in A2.
What if Advanced Formula Environment is not on the Formulas tab?
Open the OneDrive workbook in a compatible desktop version of Excel, then use Formulas > Name Manager > New to create the named LAMBDA.
Where is the named function saved?
The name is saved in the workbook. Save the workbook to OneDrive after creating it so you can use the function when you reopen that workbook.
Can I define a LAMBDA without a parameter?
Yes. A LAMBDA can contain only a calculation, such as =LAMBDA(2*3). Save it as a name in Name Manager and call it with empty parentheses, such as =MyFunction().




