Name a constant
| A | |
|---|---|
| 1 | Net |
| 2 | 200 |
Formula: C1: =LET(tax,0.0825,A2*(1+tax))
Result: 216.5
tax is defined once, then used in the calculation.
Names for intermediate results inside a formula.
LET(name1, value1, …, calculation)Example: =LET(x,A2*2,x+1)
Available in: Excel 2021+, Microsoft 365
LET gives names to values or calculations inside a formula, so each is computed once and reused: =LET(name1, value1, …, calculation). It makes long formulas readable and can speed up heavy ones.
| A | |
|---|---|
| 1 | Net |
| 2 | 200 |
Formula: C1: =LET(tax,0.0825,A2*(1+tax))
Result: 216.5
tax is defined once, then used in the calculation.
| A | |
|---|---|
| 1 | Share |
| 2 | 25 |
| 3 | 50 |
| 4 | 25 |
Formula: C1: =LET(total,SUM(A2:A4),A2/total)
Result: 0.25
total is calculated once and reused; here 25 / 100.
| A | B | |
|---|---|---|
| 1 | Spend | Budget |
| 2 | 120 | 100 |
Formula: D2: =LET(ratio,A2/B2,IF(ratio>1,"Over","Within"))
Result: Over
ratio is named once and used in the IF.
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))
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Region | Product | Units | Price | Result | |
| 2 | East | Pen | 120 | 2.5 | 58.3333333333 | |
| 3 | West | Pen | 80 | 2.5 | ||
| 4 | East | Book | 45 | 12 | ||
| 5 | North | Book | 60 | 12 | ||
| 6 | West | Lamp | 30 | 25 | ||
| 7 | East | Lamp | 15 | 25 |
Enter — commit · F2 — edit · F4 — $ in a reference · Ctrl+C/Ctrl+V — copy and paste · Ctrl+Z — undo
Esc or F6 — leave the sheet for the «Check» button · Shift+Tab in the first cell — back to the page