
LET function IN excel
Have you ever built a long formula in Excel and thought, “Why am I typing this same thing over and over?” If yes, then the LET function is about to become your new best friend.
Exclusive to Excel 365, the LET function lets you assign variables inside a formula, making your calculations easier to read, faster to compute, and way less error-prone. Whether you’re a small business owner, student, or data analyst, mastering LET will save you time (and maybe a headache or two).
Table of Contents
🔍 What is the LET Function in Excel?
In simple words, LET allows you to define a name (a variable) for a value or expression and then reuse it within the same formula. It’s like creating shortcuts for your own formulas.
🧪 Syntax:
=LET(name1, name_value1, [name2, name_value2, …], calculation)
Argument | Description |
---|---|
name1 | The variable name you want to use |
name_value1 | The value or formula you assign to that name |
calculation | The final result using the variable(s) |
✔️ Example 1: Double Discounts Made Simple
Scenario: You sell a product and offer two types of discounts – seasonal and loyalty.
Without LET:
=(A2 * 0.10) + (A2 * 0.05)
With LET:
=LET(price, A2, discount1, price * 0.10, discount2, price * 0.05, discount1 + discount2)
Why it’s better: You’re calculating A2
only once. Easier to understand and update later.
✔️ Example 2: Sales Tax + Shipping Fee
Scenario: You need to apply 18% tax and 5% shipping on total cost of items in B2, C2, and D2.
Without LET:
=((B2+C2+D2)*0.18) + ((B2+C2+D2)*0.05)
With LET:
=LET(total, B2+C2+D2, tax, total*0.18, shipping, total*0.05, tax + shipping)
Why it’s better: Define total
once. Cleaner formula and faster calculation.
✔️ Example 3: Grading Students
Scenario: You’re assigning grades based on a student’s score in A2.
With LET:
=LET(score, A2,
IF(score>=90,"A",
IF(score>=75,"B",
IF(score>=50,"C","Fail"))))
Why it’s better: Easier to understand and adjust grading scale.
🏢 Real-World Scenarios Where LET Shines
Use Case | How LET Helps |
---|---|
Sales Reports | Reuse total revenue in profit margin, taxes, and growth formulas |
Budgeting | Define income, expenses, and savings once and reuse |
Inventory | Use stock variables in reorder, cost & profit calculations |
Payroll | Calculate basic pay, overtime, and tax deductions cleanly |
⚡ Performance Boost: Why LET is Faster
Excel calculates each part of a formula separately—unless you use LET. With LET, a value like B2+C2+D2
is only calculated once and then reused. This can significantly improve speed, especially in large workbooks.
📋 Step-by-Step: How to Use LET in Excel
- Click on a cell where you want your result.
- Type
=LET(
and begin defining your variables. - Add your final calculation using those variables.
- Close the parentheses and press Enter.
Example:
=LET(base, A2, tax, base*0.18, total, base + tax, total)
🛡️ Best Practices
- Use meaningful variable names like
netSales
orbonusRate
- Keep it simple—don’t create variables for everything
- Combine LET with functions like
IF()
,XLOOKUP()
,SUM()
🚀 Bonus: Combine LET with XLOOKUP
Imagine you use XLOOKUP
and then reuse the result. LET saves time:
=LET(result, XLOOKUP(A2, B2:B10, C2:C10), result * 5)
👉 No need to repeat the entire lookup formula. You just use result
again.
🧠 Final Thoughts: Is It Worth Learning?
Yes! If you’re using Excel 365, the LET function is an amazing tool to have in your formula toolbox. It reduces complexity, increases speed, and makes life easier—especially for long, repetitive formulas.
Once you try it, you’ll wonder how you ever lived without it.
✅ Key Takeaways
- LET defines variables inside your formula.
- Improves performance by reducing recalculations.
- Works only in Excel 365 or Excel for the Web.
- Ideal for sales reports, budgets, inventory, and nested IFs.