Excel 365 + Google Sheets · LET
Name a calculation and reuse it
LET gives a name to a value or calculation inside a formula so you can reuse it. Needs Excel 365 or 2021.
LET lets you give a name to a value or a calculation inside a formula and use that name as many times as you need. Instead of repeating the same long piece three times, you write it once. The formula becomes shorter, faster to read and easier to fix.
LET is available in Excel 365, Excel 2021 or later, and in Google Sheets. It is not in Excel 2016 or 2019. Combine it with the INDEX guide or the XLOOKUP guide when you build bigger formulas.
How it works LET
LET takes pairs of a name and a value, and ends with the calculation that uses those names. Write the formula like this:
=LET(price,B2,tax,0.21,price*(1+tax))Here price is the name for B2 and tax is 21%. The last part, price*(1+tax), is the result. Excel reads price once and reuses it.
Example step by step
- Type a net price in B2, for example 200.
- Click C2 and type
=LET(price,B2,tax,0.21,price*(1+tax)). - Press Enter and read the price with tax.
- Change B2 and watch the result update.
| Net price | Tax | Result |
|---|---|---|
| 200 | 21% | 242 |
The result is 242, which is 200 plus 21 percent. The name price stands for B2 everywhere inside the formula, so you never retype the cell.
Common errors
- The last argument is a name instead of a calculation. LET always ends with the part that returns the result.
- A name looks like a cell, such as A1 or TAX1. Use clear names such as price or rate.
- You use a name outside the formula. The names only exist inside that LET.
- The file is opened in Excel 2016 or 2019 and shows #NAME?. Share it with people who have Excel 365 or Google Sheets.
Used well, LET turns long formulas into short sentences that anyone can read. Start with one or two names and compare the result with a manual calculation. LET works in Excel 365, Excel 2021 and Google Sheets.