Back to Functions

LET

Assigns name with the value_expression results and returns the result of the formula_expression. The formula_expression can use the names defined in the scope of the LET function. The value_expressions are evaluated only once in the LET function even if the following value_expressions or the formula_expression use them multiple times.

LogicalLET(name1, value_expression1, [name2, …], [value_expression2, …], formula_expression )

The LET function in Google Sheets assigns names with the corresponding value expressions and returns the result of the formula expression. It allows you to define and use variables within a formula, making it easier to write and understand complex calculations. Explore our detailed guide to learn how to effectively utilize the LET function.

Parameters

  • name1: The name to assign the first value expression to.
  • value_expression1: The value expression to assign to the first name.
  • name2, …: [Optional] Additional names to assign corresponding value expressions to.
  • value_expression2, …: [Optional] Additional value expressions to assign to corresponding names.
  • formula_expression: The expression that uses the assigned names and returns the desired result.

Step-by-Step Tutorial

  1. Assigning and using a single name and value expression:

    • Example: =LET(a, 5, a + 3)
    • Result: 8
  2. Assigning and using multiple names and value expressions:

    • Example: =LET(a, 10, b, a * 2, c, a + b, c ^ 2)
    • Result: 144

Use Cases and Scenarios

  1. Complex Calculations: Simplify lengthy formulas by assigning intermediate results to variables.
  2. Scenario Analysis: Evaluate different scenarios by assigning different values to variables.
  3. Formula Clarity: Improve readability of complex formulas by assigning descriptive names to intermediate values.

Related Articles

Newsletter

More LET examples coming soon.

We are building short, practical updates for Sheets power users.