MS Excel: LET function assigns results names to calculation results
- Fakhriddinbek
- 4 days ago
- 2 min read
The LET function in Excel allows you to assign names to calculation results or expressions and reuse them within a formula. It enhances performance, readability, and maintainability by avoiding repetition of the same expression.

Syntax
=LET(name1, name_value1, [name2, name_value2, …], calculation)
Parameters:
Argument | Description |
name1 | The first variable name you want to define |
name_value1 | The value or expression to assign to name1 |
name2, etc. | (Optional) Additional name-value pairs |
calculation | The final expression that uses the defined names |
You can define up to 126 name-value pairs.
Simple Example
=LET(x, 10, y, 5, x + y)
Variable | Value |
x | 10 |
y | 5 |
Result: 15
Real-World Example – Cleaner Formula
Suppose you calculate tax on a sales value in A1 with a tax rate of 18%.
Without LET:
=A1*0.18 + A1
With LET:
=LET(sale, A1, taxRate, 0.18, sale * taxRate + sale)
Component | Value |
sale | A1 (e.g., 100) |
taxRate | 0.18 |
Easier to understand: adds tax to the sale total.
Performance Boost Example
If you’re repeating an expensive formula, such as SUM(A1:A1000) multiple times:
Without LET:
=SUM(A1:A1000)/COUNT(A1:A1000) + SUM(A1:A1000)*0.1
With LET:
=LET(total, SUM(A1:A1000), avg, total/COUNT(A1:A1000), avg + total*0.1)
Faster and more efficient, especially with large datasets.
Nesting LET with Other Functions
You can use LET inside larger formulas to make them modular.
Example with IF and LET:
=LET(score, A1, IF(score >= 60, "Pass", "Fail"))
Summary
Feature | Description |
Function Name | LET |
Purpose | Assign names (variables) inside a formula |
Return Type | The result of the final expression |
Use Case | Simplify formulas, improve performance |
Availability | Excel 365 and Excel for Web |
Notes
Names must start with a letter and cannot be cell references.
Variables are only available inside the formula—they are not global.
If the same name is used multiple times, the last one overrides the earlier one.
Related Functions
Function | Description |
LAMBDA | Define custom functions with parameters (Excel 365) |
IF | Conditional logic |
SUM | Total of a range |
TEXT | Format numbers and values |
Final Thoughts
The LET function is one of Excel’s most powerful new features, enabling cleaner, faster, and more maintainable formulas. It’s especially useful in advanced spreadsheets and when working with large datasets or repeated expressions.
Comments