

Our sample formula calculates the percent change between 2 numbers, so we declare 2 parameters: If your formula requires input values, add them as parameters to the LAMBDA function. Create and test a LAMBDA formula in a cell To prevent #DIV/0! errors when dividing by a zero value, we wrap it in the IFERROR function like this:Īs you can see in the below screenshot, our formula works as intended, so we are ready to move on to the next step:Ģ. With cell references, it takes this form: To create a Lambda function in your workbook, these are the steps to perform: The LAMBDA function is only available in Microsoft 365 subscriptions including:

computationally universal) and allows users to perform almost any calculations in the native formula language. Microsoft announced LAMBDA in December 2020 proudly claiming that the new function makes Excel Turing-complete (i.e. At heart, it is a universal model of computation in which all functions are deemed anonymous and can be formed by abstraction. In computer science, the concept of lambdas dates back to lambda calculus (λ-calculus) introduced by American mathematician and logician Alonzo Church in the 1930s. The lambda symbol (λ) representing the 11th letter of the Greek alphabet is often used in physics, mathematics and computer science, where it carries different meanings. The LAMBDA function works without macros, VBA or JavaScript, so every user and not just programmers can benefit from it.


And then, instead of typing your original lengthy formula, you can refer to BestFunction() anywhere in your workbook. Simply put, you can now take any existing formula, whatever complex it is, wrap it up in LAMBDA, and give it any name you like, say BestFunction. The LAMBDA function in Excel is designed to create custom functions that can be called by user-friendly names and reused throughout a workbook.
