Check Sheet Logo
Check Sheet

LAMBDA

The LAMBDA formula in Google Sheets allows you to create a custom function using a custom formula expression. This formula is most commonly used when there is no built-in function in Google Sheets that can solve a specific problem. With LAMBDA, you can create your own formula that can take in multiple inputs and return a single output.

Usage

Use the LAMBDA formula with the syntax shown below, it has 2 required parameters:

=LAMBDA(name, formula_expression)
Parameters:
  1. name (required):
    A string representing the name of the custom function to be created.
  2. formula_expression (required):
    A formula expression that defines the custom function. The expression can contain references to the function's inputs.

Examples

Here are a few example use cases that explain how to use the LAMBDA formula in Google Sheets.

Calculate the percentage of a number

Use LAMBDA to create a custom function that takes in a number and a percentage and returns the result of the percentage calculation.

Check if a value is within a range

Use LAMBDA to create a custom function that takes in a value and a range, and returns whether the value is within the range or not.

Convert a string to title case

Use LAMBDA to create a custom function that takes in a string and converts it to title case (capitalizes the first letter of each word).

Common Mistakes

LAMBDA not working? Here are some common mistakes people make when using the LAMBDA Google Sheets Formula:

Incorrect use of parenthesis

One common mistake is forgetting to include the correct number of parenthesis in the formula. This can cause errors or unexpected results. Make sure to double check your parenthesis before finalizing the formula.

Misspelling the function name

Another common mistake is misspelling the LAMBDA function name. This will result in a formula error. Make sure to use the correct spelling of the function name.

Using incorrect arguments

Using incorrect arguments in the LAMBDA formula can cause errors or unexpected results. Make sure to check the formula syntax and use the correct arguments.

Not defining the function name correctly

It is important to define the function name correctly when using LAMBDA. If the function name is not defined correctly, it can cause errors or unexpected results. Make sure to use the correct function name.

Not using the correct expression

Make sure to use the correct expression in the LAMBDA formula. Using an incorrect expression can cause errors or unexpected results. Double check the expression before finalizing the formula.

The following functions are similar to LAMBDA or are often used with it in a formula:

  • IF

    The IF formula is a logical function used to test a condition and return one value if the condition is true and another value if the condition is false. It is commonly used to create conditional statements and perform calculations based on certain conditions.

  • SUM

    The SUM function in Google Sheets adds up a range of numbers. This function is most commonly used to sum the values in a range of cells.

  • AVERAGE

    The AVERAGE function calculates the average (arithmetic mean) of the values passed to it. It is commonly used to find the average of a range of cells containing numerical data.

  • VLOOKUP

    The VLOOKUP function is a lookup formula used to search for a value in the first column of a range of cells (the search key) and return a value in the same row from a specified column in that range. This function is most commonly used to look up and retrieve data from a table.

Learn More

You can learn more about the LAMBDA Google Sheets function on Google Support.