LAMBDA, the new addition to Zoho Sheet's function gallery, has the potential to change the way you work with formulas in your spreadsheet. The function helps make your formulas more readable and reusable. You can create custom functions that fit your needs and use them anywhere you want in the spreadsheet.
Creating custom functions
Let's say you pay out 10% of your sales revenue as your representative's commission. You'd probably use a formula that calculates 10% of any given input. To calculate 10% of any given value without having to key-in the actual formula, you'll need a custom function. With the LAMBDA function, you can configure an input, which here is the sales revenue, and write a custom function that gives out the commission as a result.
Defining a name + LAMBDA() = Reusable Custom Functions
Take our last example of wanting to calculate commission for sales reps. Now, let's say you want to use the function across sheets and cell ranges. Instead of building the same formula repeatedly, you can name a LAMBDA function and reuse it anywhere you want!
For instance, name the =LAMBDA(sales;sales*10/100) function "RepCommission." Now, you can use the =RepCommission in any place you need. Just give a numeric input for sales and you'll have the commission amount.
The best part about naming a LAMBDA function is that it makes your spreadsheet formulas completely self-explanatory.
Easily editable formulas
Custom functions created with name-defined LAMBDA() can be edited any time, and this change will reflect on all occurrences. Let's suppose you're increasing your sales commission from 10% to 15%. Before, you'd have to replace all the formula inputs individually. Now that you've used the =RepCommission function, editing it in the Define Name dialog box will sort your spreadsheet, making changes to every occurrence thus far.
LAMBDA's recursion support
Before LAMBDA, your spreadsheet functions could not refer to themselves, meaning they cannot loop themselves to arrive at a result or a string of results. To put it simply, the result of a LAMBDA can be fed as an input of the same function.
For example, here's a LAMBDA function that'll help you with the sum of all digits in a number -
These are just a few ways the new LAMBDA function can help you build better spreadsheets. The function is now open to everyone, and we can't wait for you to try it. Tell us about the different things you did with the LAMBDA() function in the comments below! If you have any queries, do let us know by dropping an email to email@example.com.