How to Add a Custom LAMBDA Function to an Excel Add-In
Question details
The user wants to make a custom LAMBDA or LET formula available globally across all Excel workbooks by saving it in an add-in or custom Ribbon, rather than keeping it restricted to a single workbook.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Creating reusable custom functions using LAMBDA and the Name Manager to optimize spreadsheet workflows.
- Observed behavior
- The goal is to call the custom function from any open workbook without needing to redefine it in the local Name Manager.
Ensure the Developer tab is enabled in your Excel ribbon, as you will need access to the Visual Basic Editor (VBE) to define the function globally in your Personal Macro Workbook.
Add the LAMBDA Function to the Personal Macro Workbook
Save the function in your PERSONAL.XLSB file so it automatically loads in the background every time you open Excel, allowing global access.
By using the Visual Basic Editor's Immediate window, you can programmatically add a named LAMBDA function to your personal macro workbook. This makes it permanently accessible to any other workbook you open.
Press ALT + F11 to launch the Visual Basic Editor in Excel.
If the Immediate window is not visible at the bottom of the editor, press CTRL + G to display it.
Type the following command into the Immediate window and press Enter: Workbooks("personal.xlsb").Names.Add Name:="Split_Char", RefersTo:="=LAMBDA(a,MID(a,SEQUENCE(,LEN(a)),1))"
Return to any open Excel workbook. You can now call the custom function by referencing the source workbook: =PERSONAL.XLSB!Split_Char(A1)

Use Built-in Array Functions as an Alternative
Depending on the complexity of your custom LAMBDA, newer built-in array and text manipulation functions might achieve the same result without needing global add-ins.
Use WPS Office for Powerful Spreadsheet Management
If you are struggling with complex macro setups or expensive Office subscriptions, try WPS Office. It provides a free, highly compatible alternative to Microsoft Excel with built-in support for advanced formulas, macros, and seamless multi-workbook management.

Frequently Asked Questions
How do I make an Excel LAMBDA function available to all workbooks?
To make a LAMBDA function globally available, save it in your Personal Macro Workbook (PERSONAL.XLSB) or a custom Excel Add-in (.xlam). You can define the name and formula using the VBA Immediate window so it resides permanently in those global files.
Why do I need the PERSONAL.XLSB prefix when calling my custom function?
Because the function is stored in a separate, hidden workbook (PERSONAL.XLSB), Excel requires you to specify the parent workbook's name before the function name. This is why you must type =PERSONAL.XLSB!YourFunction() instead of just =YourFunction().
Can I share my custom LAMBDA functions with other users?
Yes. To share global custom functions, you should save them in an Excel Add-in file (.xlam) rather than your personal macro workbook. Distribute this .xlam file to other users so they can install it via File > Options > Add-ins.
What is the syntax to create a named LAMBDA via VBA?
You use the Names.Add method applied to a specific workbook. The standard syntax is: Workbooks("YourWorkbookName.xlsx").Names.Add Name:="YourFunctionName", RefersTo:="=LAMBDA(variables, calculation)".




