LET: give the moving parts of a formula names
When the same expression appears three times in one cell, a reviewer has to understand it three times. LET lets you name the intermediate result once and use it again.
The last argument is the result to return. During diagnosis, temporarily return an intermediate name to see whether that step matches expectations. Names are local to this formula; they do not automatically become workbook named ranges.
| Formula | Expected result / interpretation |
|---|---|
| =LET(gross,A2,discountRate,B2,net,gross*(1-discountRate),ROUND(net,2)) | 225 |
| =LET(gross,A2,discountRate,B2,net,gross*(1-discountRate),discountRate) | 0.1 — inspect the rate |
| =LET(gross,A2,discountRate,B2,net,gross*(1-discountRate),net) | 225 — inspect the intermediate amount |
| Cell | Value |
|---|---|
| A2 | 250 |
| B2 | 10% |
Enter gross amount in A2 and discount rate in B2. Type 10% as a percentage, not the number 10.
Name a net-sales calculation and inspect each part
Formula syntax
=LET(name1, name_value1, [name2, name_value2, ...], calculation)
What goes into it
name1
Name for the first intermediate value.
name_value1
Value/expression assigned to that name.
calculation
Final expression that can use the defined names.
A quick example first
=LET(rate,B2,total,C2,rate*total)
Names two inputs and multiplies them in the final expression.
=LET(clean,TRIM(A2),IF(clean="","Missing",clean))
Reuses a cleaned text value without recalculating TRIM.
Before you copy this into a real sheet
Use a version supporting LET, such as Microsoft 365, Excel 2021 or Excel 2024. Names must obey Excel naming rules and cannot be cell references; meaningful names such as discountRate are safer than ambiguous single letters. LET does not validate the rate: a typed 10 would mean a factor of ten. Use input validation and check zero and 100% cases. Introduce names for ideas that clarify the calculation, rather than naming every constant and making a simple formula harder to read.
Useful habits
- Use descriptive names that explain the business idea.
- During debugging, temporarily return one intermediate name as the final calculation.
- LET can improve readability even when performance is unchanged.
Where people get caught out
- Using names that look like cell references or conflict with workbook naming rules.
- Creating many tiny names that make a simple formula harder rather than easier.
Other functions worth a look
A detail worth remembering
Choose names that describe what the value means, not just x or y. A clear name turns a formula into a small explanation.
Reference and examples
The examples above use small, invented datasets and English-language formula names. Check your Excel version and argument separator against the official Excel function reference if a formula behaves differently on your computer.