FormulaCamp
Completed
← Google Sheets functions
Google Sheets function

LET in Google Sheets

LET is supported in Google Sheets, where it can name an intermediate result such as a tax rate or a total.

Syntax (same in Google Sheets)

LET(name1, value1, …, calculation)

Sheets also has named functions (Data, Named functions) for logic you want to reuse across many cells.

For a fuller explanation of the arguments and common errors, see the LET Excel guide.

Worked examples in Google Sheets

Name a constant

A
1Net
2200

Formula: C1: =LET(tax,0.0825,A2*(1+tax))

Result: 216.5

tax is defined once, then used in the calculation.

Reuse a sum

A
1Share
225
350
425

Formula: C1: =LET(total,SUM(A2:A4),A2/total)

Result: 0.25

total is calculated once and reused; here 25 / 100.

Intermediate result in a test

AB
1SpendBudget
2120100

Formula: D2: =LET(ratio,A2/B2,IF(ratio>1,"Over","Within"))

Result: Over

ratio is named once and used in the IF.

Try it

A tiny spreadsheet with example data. Edit the formula or any number and see the result.

Formula in F2: =LET(total,SUM(C2:C7),total/COUNT(C2:C7))

Example spreadsheet for LET
ABCDEF
1RegionProductUnitsPriceResult
2EastPen1202.558.3333333333
3WestPen802.5
4EastBook4512
5NorthBook6012
6WestLamp3025
7EastLamp1525
Result in F2: 58.3333333333
Practice this in a lesson: LET, TEXTBEFORE, TEXTAFTER

Frequently asked questions

What is the difference between LET and a named function in Google Sheets?
LET names values inside one formula. A named function packages a whole calculation under its own name so other cells can call it.

Google Sheets is used here only as a descriptive product name. FormulaCamp is not affiliated with Google.