exceloffice365excel-lambda

In Office365 Excel, how to define a named lambda function without using the Name Manager "Refers to" field?


Preferably the lambda function defined in the worksheet. Google Bard said to use the name() function, but there is no such function in Excel. Also tried the "Create from Selection" approach where the name is in cell A1 and the lambda function is in cell B1, but that doesn't work either.

The problem with defining it in the name manager "Refers to" field is the lambda function loses its formatting making it hard to read. Defining it in a cell would retain indentation and spaces but I haven't found a way for this to work... yet.


Solution

  • Why not use the Advanced Formula Environment?

    This is an easier way to create lambdas and to edit formulas generally. As shown in the link, it formats complicated formulas in a readable way.

    As a trivial example, you could create a lambda called Add like this:

    enter image description here

    and it looks like this in Name Manager:

    enter image description here

    and you can use it like this:

    enter image description here