How to use LET to make long formulas readable

LET gives names to pieces of one formula. The names exist only inside that formula. A name you want on every sheet belongs in the Name Manager, which is what LAMBDA is for.

LET is in Microsoft 365, Excel 2021, Excel 2024, and Excel for the web. Excel 2019 returns #NAME?. A name cannot look like a cell address. price is a name. B1 is a reference, and LET will not accept it as a name.

One product

The price and the rate are the pair on the LET page. 49 × 0.0825 = 4.0425.

LET
=LET(price,B1,rate,B2,price*rate)
=LET(price,B1,rate,B2,price*rate)B3
The tax, named once
AB
1Price$49
2Rate8.25%
3Tax4.0425
A picture of the LET page. The price is $49 and the rate is 8.25%, stored as 0.0825. The product is 4.0425. ROUND of it is $4.04.

The same cell without names is =B1*B2. Naming pays off when the piece is used twice, or when the formula is long enough that the cell addresses stop being readable.

ROUND of 4.0425 to two decimals is 4.04. ROUNDUP of it is 4.05. Those are the figures on the ROUND page.

Use the name a second time

A later name can use an earlier one. tax is price*rate, and the result is price+tax. The last argument is the value the cell returns. It is not another name.

LET
=LET(price,B1,rate,B2,tax,price*rate,price+tax)
=LET(price,B1,rate,B2,tax,price*rate,price+tax)B3
The same tax, used again
AB
1Price$49
2Rate8.25%
3Total53.0425
A picture that names tax and then adds it to the price. 49 times 0.0825 is 4.0425. 49 plus 4.0425 is 53.0425. The price is written once.

49 + 4.0425 = 53.0425. The price is typed once. The formula without LET, =B1+B1*B2, types the price twice and returns the same 53.0425. ROUND of 53.0425 to two decimals is 53.04. A currency format shows $53.04 and leaves 53.0425 stored, which is a different cell from one that was rounded.

Round inside the name

LET
=LET(price,B1,rate,B2,tax,ROUND(price*rate,2),price+tax)
=LET(price,B1,rate,B2,tax,ROUND(price*rate,2),price+tax)B3
Round the named tax, then add
AB
1Price$49
2Rate8.25%
3Total53.04
A picture of the rounded path. ROUND of 4.0425 to two decimals is 4.04. The price plus that tax is 53.04. ROUNDUP of the same 4.0425 is 4.05, which would make the total 53.05.

Here tax is already rounded to the cent, and the total adds that cent. 49 + 4.04 = 53.04. ROUNDUP of 4.0425 is 4.05, and 49 + 4.05 = 53.05. The two rounding functions are not interchangeable, and the name makes it obvious which one the total is using.


More from the blog