Lambda Functions in Microsoft Excel

How to use Lambda functions in Excel.

What is LAMBDA? It allows us to take a formula and convert it into our own named custom function. Here’s an example of creating a custom function using Lambda:

Lambda Function to multiply two numbers
Lambda Function to multiply two numbers

Normally we create such functions using VBA and collectively they are called User Defined Functions (UDF). An interesting example of a user-defined-function is to calculate compound interest. If we make use of repeated calculations and wish to define such a function once and reuse it, we can create a LAMBDA function as shown in the image above. We show below the same MyLambda function in an Excel worksheet:

Custom function to multiply two numbers using Lambda
Custom Function Using Lambda

How to name a Lambda Function.

Once we have thought of a function and confirmed the validity of its results , we can give it a name and store it for reuse. Here we make use of the name manager.

Name Manager
Name Manager

We click on Formulas and the Name Manager and enter the details:

Name: The name of our function. We could also name the function ProductOfTwoNumbers.
Comment: We have added no comment. But we could add: multiplies two numbers.
Refers to: Our lambda function definition.

MyLambda - Custom Function multiplies two numbers
MyLambda – Custom Function multiplies two numbers

It’s done! We can make use of your new custom function in the workbook by calling it by its name: =MyLambda(A2,B2)

This would return the value 35 as shown above since the range A2 has the value 5 and the range B2 has the value 7.

Watch the video below:

Lambda Functions in MS Excel

Published by

Dinesh Kumar Takyar

Welcome to exceltrainingvideos.com! My aim is to help you learn MS Excel including VBA. I always felt that a good way to learn something was to find solutions to problems in that domain. That is why I share these Excel videos with you. Mostly these are questions asked during my corporate training sessions. I've been training individuals and companies in computers since 1991. I did my B. Sc. (Vordiplom), M. Sc. (Diplom) and Ph.D. (Dr. rer. nat.) from Hamburg, Germany. The best thing about solving some of my visitor's questions is that I also gain new insights. For more Excel VBA solutions you may like to visit my YouTube channel: http://youtube.com/familycomputerclub For a structured Excel VBA training course online you can visit: https://www.youtube.com/excelvbaonline

One thought on “Lambda Functions in Microsoft Excel”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.