ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Dynamic arrays
  3. LET Function in Excel: Name the Parts of a Formula

LET Function in Excel: Name the Parts of a Formula

By ExcelReady Team·Updated November 2, 2026·6 min read

The short answer

The LET function in Excel gives names to values or calculations inside one formula. You write =LET(name, value, calculation), then use the name instead of repeating the same piece. Excel works out each value once, so long formulas get shorter, easier to read and often faster. LET needs Microsoft 365, Excel 2021 or later.

Key takeaways

  • The shape is =LET(name1, value1, [name2, value2, ...], calculation). The last argument is always the result.
  • Each value is calculated once, even if its name is used many times, which can speed up heavy formulas.
  • Names exist only inside that formula and can't look like a cell address, such as A1 or TAX2026.
  • LET pairs well with FILTER: name the filtered list once, then SUM, COUNT or AVERAGE it.
  • Older Excel shows #NAME? for LET, so share LET formulas only with Excel 2021 or Microsoft 365 users.
On this page+
  1. What does the LET function do?
  2. Why use LET? A formula without it
  3. How to write a LET formula, step by step
  4. Rules for LET names
  5. When does LET make formulas faster?
  6. Common LET errors
  7. Practise it

The LET function in Excel lets you name the parts of a formula. Instead of repeating the same calculation three times, you name it once, such as total, and use the name wherever you need it. Your formula gets shorter, easier to check and often faster. This guide is for anyone who writes long formulas in Microsoft 365 or Excel 2021 and wants them to read more like plain sentences.

What does the LET function do?#

LET stores a value under a name for the length of one formula. The value can be a number, a range or a whole calculation. The last argument is the calculation that uses those names, and its answer is what the cell shows.

Excel formula
=LET(name1, value1, [name2, value2, ...], calculation)
PartWhat it meansExample
name1A name you choose, starting with a letterrate
value1What the name stands for0.05 or SUM(C2:C8)
name2, value2Optional extra pairs, up to 126 in totaltotal, SUM(C2:C8)
calculationThe formula that uses the names. Its result is returnedtotal*rate

A tiny example: =LET(x, 5, x*2) returns 10. The name x means 5, and the calculation doubles it.

LET is part of the newer set of functions that came with dynamic arrays. It needs Microsoft 365, Excel 2021, Excel 2024 or Excel for the web. Excel 2019 and earlier show #NAME?. The overview of dynamic arrays in Excel explains what else arrived at the same time.

Why use LET? A formula without it#

LET exists because long formulas often repeat the same piece. Take this sales table in A1:C8:

ABC
1RepRegionSales
2AnaNorth4,200
3BenSouth3,100
4CaraNorth5,600
5DevEast2,900
6EliNorth3,800
7FaySouth4,700
8GusEast3,300

The North team earns a 5% bonus on its total sales if the total is over 10,000, and 3% if not. Without LET, the formula repeats the North total three times:

Excel formula
=IF(SUM(FILTER(C2:C8,B2:B8="North"))>10000,SUM(FILTER(C2:C8,B2:B8="North"))*5%,SUM(FILTER(C2:C8,B2:B8="North"))*3%)

It works, but it is hard to read, and if the region changes you must edit it in three places. Excel also runs the same FILTER three times.

How to write a LET formula, step by step#

Here is the same bonus with LET:

Excel formula
=LET(north, FILTER(C2:C8,B2:B8="North"), total, SUM(north), IF(total>10000, total*5%, total*3%))

Read it from left to right:

  1. north, FILTER(C2:C8,B2:B8="North") names the list of North sales: 4,200, 5,600 and 3,800.
  2. total, SUM(north) adds that list and names the answer: 13,600. A later name can use an earlier one.
  3. IF(total>10000, total*5%, total*3%) is the calculation. 13,600 is over 10,000, so the result is 13,600 × 5% = 680.

To change the region, you now edit one word. If you are new to FILTER, the FILTER function guide and the article on how FILTER returns matching rows explain it.

Long LET formulas are easier to read on several lines. Press Alt+Enter (Mac: Option+Return) inside the formula bar to start a new line, and widen the formula bar with the arrow at its right edge.

Rules for LET names#

LET names follow the same rules as defined names, with a few extra points:

  • Start with a letter (or an underscore). Don't use spaces. north_total works, north total doesn't.
  • A name can't look like a cell address. tax1 is fine, but TAX2026 is a real cell in column TAX, so Excel rejects it.
  • Names are not case-sensitive. Total and total are the same name.
  • Each name exists only inside its own formula. Another cell can't use it.
  • You need pairs. Name, value, name, value, and then one final calculation. An even number of arguments means the calculation is missing, and Excel will not accept the formula.

If you want a name the whole workbook can use, create a defined name with Formulas > Define Name instead. LET is for names that only one formula needs.

When does LET make formulas faster?#

LET helps speed when a heavy piece is repeated. Every FILTER, XLOOKUP or SUMPRODUCT in a formula is a calculation. Without LET, a piece that appears three times runs three times. With LET, it runs once.

On a small sheet you won't notice. On a large model with thousands of rows, removing repeated lookups can matter. The guide to why Excel formulas get slow lists other fixes.

LET is also a neat way to avoid repeating a lookup just to hide a blank or an error, a pattern you will know from making VLOOKUP return blank instead of 0:

Excel formula
=LET(price, XLOOKUP(F2,A2:A8,C2:C8,""), IF(price="","",price*1.2))

The lookup runs once, and the name price is checked and used.

Common LET errors#

Most LET errors come from missing pieces:

  1. #NAME? in older Excel. The file was opened in Excel 2019 or earlier. Replace LET with a normal formula, or use helper columns.
  2. #NAME? in new Excel. A name is misspelled in the calculation, or it is used before it is defined. Names must be defined left to right.
  3. "There's a problem with this formula". Usually a missing comma, or no final calculation after the last pair.
  4. A name that looks like a cell. Names such as q1 or Q2026 are real cell addresses, so Excel rejects them. Use q_1 or q_2026 instead.

To check a LET formula, select the cell and use Formulas > Evaluate Formula (Windows) to step through it, or test each value in a spare cell first.

Practise it#

LET is easiest once FILTER and the other modern functions feel natural. Start with the exercise on this page, which builds the north piece. Then practise FILTER in a live spreadsheet and work through the modern Excel functions lesson, where every formula is checked as you type. When you can write the pieces, wrapping them in LET is one small step.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

This is the piece a LET formula would name north. In G2, total the Sales (C2:C8) for the North region with =SUM(FILTER(C2:C8,B2:B8="North")), then press Enter.

fx
ABCDEFGH
1
Rep
Region
Sales
2
Ana
North
4200
North total
3
Ben
South
3100
4
Cara
North
5600
5
Dev
East
2900
6
Eli
North
3800
7
Fay
South
4700
8
Gus
East
3300
9
10
11

Tip: FILTER keeps the Sales values where the Region is North. SUM adds what FILTER returns.

Practise this in a lesson

LessonModern Excel: XMATCH, SORTBY, TEXTSPLIT and spill references (A2#)Split names with TEXTSPLIT, find positions with XMATCH, sort by another column with SORTBY, and refer to a whole spilled result with A2#.LessonFILTER: pull matching rows with a formulaReturn every row that meets one or more conditions with FILTER, and show a friendly message when nothing matches.Function guideFILTERReturn every row that matches a condition with Excel's FILTER. Multiple criteria, empty results and #SPILL! explained, with live practice.

Frequently asked questions

What does the LET function do in Excel?

+

LET lets you name a value or calculation inside a formula, then use that name in the final calculation. It removes repeated pieces, makes long formulas readable and calculates each named part only once.

Which versions of Excel have LET?

+

LET is available in Microsoft 365, Excel 2021, Excel 2024 and Excel for the web. Excel 2019 and earlier do not have it and show #NAME? instead.

How many names can I define with LET?

+

Up to 126 name and value pairs. In practice two to five names cover most formulas, and more than that usually means the work belongs in helper columns.

Can I use a LET name in another cell?

+

No. A LET name exists only inside the formula that defines it. To reuse a name across the workbook, create a defined name with Formulas > Define Name instead.

Does LET make formulas faster?

+

It can. Without LET, a repeated piece such as a FILTER or a lookup is calculated every time it appears. With LET it is calculated once and reused, which helps most in large or array-heavy workbooks.

Sources

  • FILTER function - Microsoft Support
  • Dynamic array formulas and spilled array behavior - Microsoft Support
  • Define and use names in formulas - Microsoft Support

Written and checked by the ExcelReady Team. First published November 2, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What does the LET function do?
  2. Why use LET? A formula without it
  3. How to write a LET formula, step by step
  4. Rules for LET names
  5. When does LET make formulas faster?
  6. Common LET errors
  7. Practise it

Keep reading

Dynamic arrays· 6 min read

Dynamic Arrays in Excel Explained Simply

Dynamic arrays let one Excel formula return several values that spill into the cells below or beside it. Type =UNIQUE(B2:B9) in one cell and the whole list appears, then resizes when the data changes. They need Excel 2021, Excel 2024, Microsoft 365 or Excel for the web. Refer to a whole spill with a # after its first cell, such as E2#.

Dynamic arrays· 6 min read

The FILTER Function in Excel (With AND and OR)

FILTER returns every row of a range that passes a test: =FILTER(A2:C9,B2:B9="East"). The matching rows spill into the cells below and update when the data changes. For AND, multiply tests in brackets; for OR, add them. The third argument shows a message when nothing matches. FILTER needs Excel 2021, Excel 2024 or Microsoft 365.

Lookups· 6 min read

VLOOKUP Return Blank Instead of 0

VLOOKUP shows 0 when the cell it returns is empty. To return a blank instead, test the result and swap it for empty text: =IF(VLOOKUP(E2,A2:C6,3,FALSE)="","",VLOOKUP(E2,A2:C6,3,FALSE)). A shorter trick is =VLOOKUP(E2,A2:C6,3,FALSE)&"", but that turns numbers into text. In Microsoft 365, LET avoids repeating the lookup.

More on dynamic arrays

  • List All Matching Values in One Cell
  • How to Randomize a List in Excel With SORTBY
  • How to Reverse the Order of a List in Excel
  • The SEQUENCE Function in Excel
  • Make a List of Dates With SEQUENCE in Excel
  • Sort and Filter Together With One Formula
All dynamic arrays articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free