Once defined and named, a LAMBDA function can be used anywhere in a workbook.

LAMBDA functions can be very simple or quite complex, stringing together many Excel functions into one formula.

A custom LAMBDA function does not require VBA or macros.

Standard formula version

An anonymous function is a function defined without a name.

In Excel, the LAMBDA function is first used to create a generic (unnamed) formula.

TheLET functionis often used together with the LAMBDA function.

Standard formula version

LET provides a way to declare variables and assign values in a formula.

This makes more complicated formulas easier to read by reducing redundant code.

The LET function can also improve performance by reducing the number of calculations performed by a formula.

Standard formula version

By default, all arguments in a LAMBDA function are required.

To createoptionalarguments, see theISOMITTED function.

The first thing to consider is if the formula requires inputs (parameters).

Standard formula version

This allows the formula to be tested directly on the worksheet before the LAMBDA is named.

First, copy the formula,but do not includethe testing parameters at the end.

Next, kick off the Name Manager with the shortcutControl + F3, and click New.

Standard formula version

(Tip: Use the tab key to navigate to the “Refers to” field).

check that the formula begins with an equals sign (=).

The generalExcel formula for calculating the volume of a sphereis:

where A1 represents the radius.

Generic (unnamed) lambda version

The name used for a LAMBDA function can be any valid Excel name.

In this case, we’ll name the formula “SphereVolume”.

We’ll address this problem below.

Click New in Name Manager

This formula only requires one input: the text containing words.

In our LAMBDA function, we’ll name this argument “text”.

In the screen below, we’ve replaced the original formula with the generic LAMBDA version.

Name and define LAMBDA in name manager

We’ll name this formula “CountWords”.

Notice we get exactly the same results.

This problem can be fixed by replacing +1 with the code below:

Full explanation here.

Named LAMBDA function in action

This is a key benefit of custom functions created with LAMBDA formula updates can be managed in one place.

The result can be very confusing.

Avoid this trouble by making sure your custom function name is unique.

Standard Excel formula for volume of sphere

LET Function

The Excel LET function lets you define named variables in a formula.

Inside a LAMBDA function, ISOMITTED will return TRUE when an argument has not been provided.

BYCOL can apply stock functions like SUM, COUNT, and AVERAGE or a custom LAMBDA function.

Generic (unnamed) LAMBDA formula for volume of sphere

BYROW can apply stock functions like SUM, COUNT, and AVERAGE or a custom LAMBDA function.

All results are returned at the same time in a single array….

Named LAMBDA formula for volume of sphere

Standard formula for counting words

Generic LAMBDA for counting words

Named LAMBDA for counting words - CountWords

After updating CountWords in Name Manager

Excel formula: Sum by quarter

Excel formula: LAMBDA strip trailing characters recursive

Excel formula: Row is blank

Excel formula: LAMBDA replace characters recursive

Excel formula: Get address of named range or table

Excel formula: Sum by week

Excel formula: LAMBDA strip characters

Excel formula: Get row totals

Excel formula: LAMBDA count words

Excel formula: Sum by week number

Excel formula: LAMBDA contains which things

Excel formula: Unique values case-sensitive

Excel formula: LAMBDA append range horizontal

Excel formula: LAMBDA contains one of many

Excel formula: LAMBDA split text to array

Excel LAMBDA function

Excel LET function

Excel ISOMITTED function

Excel MAP function

Excel SCAN function

Excel REDUCE function

Excel MAKEARRAY function

Excel BYCOL function

Excel BYROW function

Standard Excel formula for volume of sphere

Generic (unnamed) LAMBDA formula for volume of sphere

Named LAMBDA formula for volume of sphere

Standard formula for counting words

Generic LAMBDA for counting words

Named LAMBDA for counting words - CountWords

After updating CountWords in Name Manager