=LET(name1, value1, name2, value2, calculation)One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.
Need more than a single LET formula? Try our free AI for Excel — it reads your entire spreadsheet, answers questions in plain English, and builds charts and analysis in the same chat.
name1:
The first name you want to assign to a value or expression within the formula.
value1:
The value or expression that you want to assign to name1. This can be a number, text, array, or any valid Excel expression.
name2:
The second name you want to assign to another value or expression within the formula.
value2:
The value or expression that you want to assign to name2. This can also be a number, text, array, or any valid Excel expression.
calculation:
The calculation or expression that uses the previously defined names (name1, name2) to produce a result. This can include arithmetic operations, functions, or any valid Excel formula that utilizes the defined names.
The LET function in Excel is a versatile tool that allows you to assign names to calculation results, making your formulas easier to read and more efficient. It enables you to define variables within a formula, which can then be reused multiple times, reducing the need for repetitive calculations.
In simpler terms, the LET function helps you simplify complex formulas by breaking them down into manageable parts, enhancing both clarity and performance.
Imagine you are analyzing a dataset of employee performance metrics, and you have the following data in an Excel spreadsheet:
| Employee | Sales | Bonus Rate |
|---|---|---|
| Alice | 500 | 0.10 |
| Bob | 700 | 0.15 |
| Charlie | 600 | 0.12 |
| David | 800 | 0.20 |
| Eve | 400 | 0.08 |
You want to calculate the total bonus for each employee based on their sales and bonus rate.
To calculate the total bonus for each employee, you would use the LET formula as follows:
=LET(sales, B2, bonusRate, C2, sales * bonusRate)When you apply the formula for each employee, it calculates their respective bonuses. For example, for Alice, the output would be:
| Employee | Total Bonus |
|---|---|
| Alice | 50 |
Here, the total bonus amount is calculated as 500 (Sales) * 0.10 (Bonus Rate) = 50.
The LET function is particularly useful when you have complex calculations that involve multiple steps or repeated references to the same value. It enhances formula readability and can improve performance by reducing calculation time.
Understanding how to use the LET function can significantly improve your formula-writing skills in Excel, allowing you to create more organized and efficient calculations.
Happy calculating!
You have a dataset where Column A contains product names, Column B contains their prices, and Column C contains the quantities sold. You can use the LET function to define variables for total revenue and total items sold, allowing you to calculate the average selling price per item efficiently. This simplifies the process of analyzing product performance and helps in making informed inventory and pricing decisions without repeatedly calculating the same values.
Beyond the LET function: Better Analyst is a full Excel AI that goes well past individual formulas. Upload any spreadsheet and ask questions in plain English — you'll get formulas, data analysis, and charts back in seconds. It's a free AI Excel assistant that works with any .xlsx, .xls, or .csv file — no plugins, no Microsoft 365 required.
Don't have a spreadsheet yet? Use our free AI spreadsheet generator to turn a text prompt into a downloadable Excel file — a full AI Excel sheet maker that builds headers, columns, and formulas from your description.
Create a free account for formula help, explanations, and spreadsheet analysis. Usage limits depend on your plan.
Browse our complete library of Excel formula guides
Compare your options
Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.
AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.