Build readable, reusable custom functions with LAMBDA()

Build readable, reusable custom functions with LAMBDA()


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. 
=LAMBDA(sales;sales*10/100)


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 support@zohosheet.com.

    Zoho Marketing Automation
            • Sticky Posts

            • Publish spreadsheets, sheets, or ranges with specific customizations

              Publishing a spreadsheet allows you to share your reports or data with a wider audience. To expand the publishing capabilities for your spreadsheet, we've revamped the publish controls in Zoho Sheet.   New look, extensive options With the new publish
            • Conditional Formatting Enhancements

              We have been supporting conditional formatting in Zoho Sheet for more than 11 months now. We support setting rules on Numbers, Text, Data, Cells containing blanks, and errors. We also support setting specific formats based on the result of a Formula. This could be very powerful and could be used to color whole rows based on the value on a particular column. For example, you can define a formula criterion to color alternative rows of a table or to highlight rows if the date in one of the columns falls
            • One cell, multiple formats, unlimited possibilities.

              Spreadsheet formats are more than an aesthetic choice. Proper formatting helps audiences understand your spreadsheet better. Zoho Sheet now allows you to format different parts of your content in cells however you want. What can you do with the new formatting
            • Refine by Zia: a smart way to improve data quality

              Zia in Zoho Sheet has been helping users with recommended charts, pivot tables, and offering insights about their data. While there is an exclusive smart data cleaning tool, from now on Zia will also include data quality suggestions for error-free analysis,
            • Webinar: Learn how to instantly clean your spreadsheet data

              Hello! Do you find it tedious to get rid of duplicate entries, inconsistencies, and missing values in your data? Join our webinar and learn the trick to clean up your data in an instant. In this session you'll be introduced to the smart data cleaning tool in Zoho Sheet followed by a live demonstration.  ​ In this session, you'll get to know: What's new in Zoho Sheet About a smart tool to clean your spreadsheets in an instant How to find and remove duplicate records from your data How to get rid of

            Zoho Pagesense Resources

              Zoho SalesIQ Resources



                    Zoho TeamInbox Resources

                      Zoho DataPrep Resources



                        Zoho CRM Plus Resources

                          Zoho Books Resources


                            Zoho Subscriptions Resources

                              Zoho Desk Resources

                                Zoho Projects Resources


                                  Zoho Sprints Resources


                                    Qntrl Resources


                                      Zoho Creator Resources


                                        Zoho WorkDrive Resources




                                            Zoho Campaigns Resources

                                              Zoho CRM Resources

                                                      Design. Discuss. Deliver.

                                                      Create visually engaging stories with Zoho Show.

                                                      Get Started Now