ExcelFormattingBeginnerLast updated: August 22, 2025

Let Function in Excel: A Step-by-Step Guide to Dynamic Calculations

If you’ve ever struggled with repetitive formulas or wanted to simplify complex calculations in Excel, the LET function is your solution. Introduced in Excel 365 and Excel 2021, LET lets you define named variables within a single formula, reducing redundancy, improving readability, and making errors easier to fix. This guide will break down how LET works, when to use it, and walk you through real-world examples—perfect for both beginners and experienced Excel users.

What Is the LET Function?

At its core, the LET function solves a common Excel pain point: repeating the same value or calculation multiple times in one formula. Instead of typing a long, nested formula with duplicate parts (e.g., calculating A1*B1 3 times), LET lets you:

  1. Define a name for a value/calculation (like a variable in coding).
  2. Reuse that name throughout the formula.
  3. Output a final result using those names.

Basic Syntax

The LET function uses a simple "name-value-result" structure:

=LET(name1, value1, [name2, value2, ...], result)
  • name1: A short, descriptive name for your variable (e.g., taxRate, totalSales—no spaces allowed; use underscores if needed, like total_sales).
  • value1: The value or calculation assigned to name1 (e.g., 0.08 for an 8% tax rate, A1+B1 for total sales).
  • result: The final calculation you want to return (uses the names you defined).

basic syntax
basic syntax

Why Use LET? 3 Key Benefits

Let’s start with a simple example to see why LET is better than traditional formulas:

Scenario: Calculate Total Cost (Including Tax)

Suppose you need to calculate the total cost of a product, where:

  • Price per unit = Cell A1 (e.g., $50)
  • Quantity = Cell B1 (e.g., 4)
  • Tax rate = 8% (fixed for all products)

Traditional Formula (No LET)

You’d have to repeat A1*B1 (subtotal) twice:

=(A1*B1) + (A1*B1)*0.08

If you later want to change the tax rate (e.g., to 9%), you’d have to update it everywhere it appears.

LET Formula

With LET, define subtotal and taxRate once, then reuse them:

=LET(
  subtotal, A1*B1,
  taxRate, 0.08,
  subtotal + subtotal*taxRate
)
  • Easier to read: Anyone looking at the formula knows subtotal means A1*B1.
  • Faster to edit: Change taxRate from 0.08 to 0.09 once, and the entire formula updates.
  • Fewer errors: No more typos from repeating calculations (e.g., accidentally typing A2*B1 instead of A1*B1).

let formula
let formula

Step-by-Step Examples: Let in Action

Let’s dive into 3 practical examples—from simple to advanced—to master LET.

Example 1: Simplify a Nested Formula (Grade Calculation)

Suppose you want to calculate a student’s final grade, where:

  • Homework score = Cell C1 (e.g., 85)
  • Exam score = Cell D1 (e.g., 92)
  • Homework weight = 30%, Exam weight = 70%

Traditional Nested Formula

=(C1*0.3) + (D1*0.7)

This works, but if you have 10+ grades to calculate, it’s hard to track what 0.3 and 0.7 mean.

LET Formula

Define hw_weight and exam_weight to make the formula self-documenting:

=LET(
  hw_score, C1,
  exam_score, D1,
  hw_weight, 0.3,
  exam_weight, 0.7,
  (hw_score*hw_weight) + (exam_score*exam_weight)
)

Now, even a new user will understand how grades are weighted.

Grade Calculation
Grade Calculation

Example 2: Reuse a Complex Calculation (Discount + Tax)

Let’s add more layers: Calculate final price after a discount AND tax.

  • Original price = A1 ($100)
  • Discount rate = B1 (15% → 0.15)
  • Tax rate = 8% (fixed)

LET Formula

=LET(
  original_price, A1,
  discount_rate, B1,
  tax_rate, 0.08,
  discounted_price, original_price*(1 - discount_rate),
  final_price, discounted_price*(1 + tax_rate),
  final_price
)

Here, we define 5 variables—each step builds on the last. If you want to adjust the discount logic (e.g., original_price - (original_price*discount_rate)), you only change discounted_price once.

Discount + Tax
Discount + Tax

Example 3: Advanced: Combine LET with Other Functions (Data Analysis)

LET shines when paired with functions like SUM, VLOOKUP, or IF. Let’s calculate the average sales per region, then flag regions above/below average.

  • Sales data: Cells A2:A10 (sales amounts), B2:B10 (regions: "North", "South", "East", "West")
  • Target region: C1 (e.g., "North")

LET Formula

=LET(
  target_region, C1,
  region_sales, SUMIF(B2:B10, target_region, A2:A10),
  total_sales, SUM(A2:A10),
  avg_sales, total_sales/4,
  IF(region_sales > avg_sales, 
     "Above Average: " & region_sales, 
     "Below Average: " & region_sales)
)

Result: If North’s sales are $5,000 and the average is $4,500, it returns Above Average: 5000.

Data Analysis
Data Analysis

Common Mistakes to Avoid with LET

  1. Invalid variable names: Don’t use Excel reserved words (e.g., SUM, IF) or spaces. Use tax_rate instead of tax rate.
  2. Mismatched name-value pairs: For every name, you need a value. If you have name1, value1, name2, Excel will throw an error.
  3. Forgetting the final result: The last argument in LET must be the result (the calculation you want to output).
  4. Using LET in older Excel versions: LET only works in Excel 365 and Excel 2021. If you share files with someone on Excel 2019 or earlier, they’ll see #NAME? errors.

When to Skip LET (And Use These Alternatives)

LET is powerful, but it’s not always necessary:

  • Simple, one-time calculations: If your formula only uses a value once (e.g., A1*2), LET is overkill.
  • Sharing with older Excel versions: Use Defined Names (Formulas tab → Define Name) instead—they work in all versions.
  • Dynamic variables that change with cells: If you need a variable to update across multiple cells (e.g., a tax rate used in 100 rows), store it in a cell (e.g., C1=0.08) and reference C1 instead of defining it in LET.

Final Tips for Mastering LET

  • Start small: Try replacing 1-2 repetitive formulas with LET first—don’t rewrite your entire workbook at once.
  • Use line breaks: As in the examples, press Enter after each name-value pair to make the formula easier to read (Excel ignores line breaks in LET).
  • Test step-by-step: If your LET formula returns an error, check each variable individually. For example, in the discount example, type =discounted_price in a blank cell to see if it calculates correctly.

By the end of this guide, you should be able to use LET to simplify complex formulas, reduce errors, and make your Excel spreadsheets more maintainable. Try it with your own data—once you use LET, you’ll wonder how you ever lived without it!

Have a problem with Excel or Google Sheets?

Tell us about the issue you're facing, and we'll create a step-by-step guide for it.