Google Sheets Function: LET

The Excel LET function assigns a name to values and then returns the result of the formula.

This function allows reusing a result multiple times without having to recalculate it multiple times (if you are familiar with the concept of variables, this function allows assigning values to variables and then using these variables in the formula).


=LET(name1, value_expression1, formula_expression)


=LET(name1, value_expression1, name2, value_expression2, ..., formula_expression)

Example of use

In this simple example (with IF and AVERAGE functions), the formula displays one of 3 pieces of information depending on the average of the scores:

google sheets if average functions let

In this formula, the same average is calculated twice, so the goal here will be to use the LET function to avoid this double calculation.

Enter the LET function followed by the name of the variable (for example, "average"):


Then enter the formula that will correspond to "average":


And to finish, insert the previous formula in its entirety and replace AVERAGE(B2:C2) with average:


The LET function will then calculate the average once and then calculate the result of the IF formula:

google sheets let function
If needed, you can copy the Google Sheets document (or view the document) with this example.