Forum Discussion
Chris_Gross
Microsoft
Dec 03, 2020LAMBDA Examples: Distance between two cities
This post is the first of a series where we will be sharing out examples of lambdas. This is intended to highlight lambdas we have cooked up that show the power of this new super-charged function. Ad...
Sameer_Bhide
Dec 09, 2020Iron Contributor
Are there plans to support names defined using LAMBDA functions to be distributed via Add-ins or are we back to PERSONAL.xlsb Cheers Sam
David Hager
Dec 10, 2020Copper Contributor
Sameer_Bhide You can save all of your LAMBDA formulas in a workbook and then move/copy a blank worksheet from that workbook to another workbook where you want to use them.
- lori_mDec 10, 2020Steel Contributor
Copying a sheet is a neat trick. XLM functions can't be input in the worksheet but should still be ok within names, this is still in beta however and it looks like a number of things are not quite how they should be yet.
Sameer_Bhide
That method comes from having spent too much time writing Excel4 macros even before VBA was mainstream! XLM language is long gone, as you say, but the same environment is now playing a key role as the old macro functions were defined via names in much the same way the new LAMBDA function is. Another little known feature of Excel is that every session has a hidden macro workbook which is where XLL function names are stored. In fact it's possible to copy workbook names to this hidden area as follows...
Enter the formula =MyFunc in A1, defined as before, and from the VBA immediate window execute the following command (in R1C1 notation)ExecuteExcel4Macro "COPY(!C1,TEXTREF(""C1""))"
MyFunc is now defined like an XLL function that can be accessed from any open workbook and is available even when the original workbook is closed.