AI · 2 min read

LET

LET function in Excel: Names calculation results.

Excel functions / Logical
Logical function · Excel

LET function

LET names a value or calculation inside a formula. Long formulas become easier to read and repeated work runs only once.

Syntax

=LET(name1, value1, [name2, value2, ...], calculation)
Switch to the Google Sheets page

Arguments

ArgumentRequiredMeaning
name1YesA name that starts with a letter.
value1YesThe value or calculation that name stands for.
calculationYesThe final formula, which uses the names.

Worked example

ABC
1RegionMonthSales
2EastJan1200
3WestJan950
4EastFeb1400
5WestFeb800
6EastFeb300
=LET(total,SUM(C2:C6),east,SUMIF(A2:A6,"East",C2:C6),east/total)
Result: 0.6237 (East share of total, 2,900 of 4,650)

The formula names the total and the East subtotal, then divides one by the other.

Try it

The practice engine does not include LET. The result shown was checked by hand and with the SUM and SUMIF parts.

Availability

PlatformStatus
ExcelMicrosoft 365, Excel 2024, Excel 2021, Excel for the web.
Google SheetsAvailable.

Common mistakes

  • The last argument must be the calculation, or the formula returns an error.
  • A name cannot look like a cell reference, such as Q1.

Do it with AI

Paste this prompt into Copilot, Gemini or another assistant. Check the result on a small sample first.

Rewrite this formula with LET and clear names: =IF(SUM(C2:C6)=0,0,SUMIF(A2:A6,"East",C2:C6)/SUM(C2:C6))