Defining Custom Functions With LAMBDA
Wrap a calculation into a reusable named function.
Building Your Own Function
Excel ships with hundreds of functions like SUM and XLOOKUP. But what if you need one that does not exist, such as converting Celsius to Fahrenheit?
The LAMBDA function lets you define your own reusable function using only formulas, no programming required. You describe the inputs (called parameters) and the calculation, and Excel treats it like any built-in function.
LAMBDA is available in Microsoft 365 and Google Sheets. In this lesson you will learn to wrap a calculation into a reusable named function.
The Shape of LAMBDA
A LAMBDA has two parts: a list of parameter names and a final calculation that uses them.
The pattern looks just like LET: every argument except the last is a parameter name, and the last argument is the formula that does the work.
A LAMBDA on its own does nothing until you give it values, just like a recipe does nothing until you cook with ingredients.
=LAMBDA(parameter1, parameter2, calculation)All lessons in this course
- Naming Steps With LET
- Defining Custom Functions With LAMBDA
- Looping With MAP and REDUCE
- Cleaner Formulas With Named LAMBDAs