Spreadsheet Practice

LET formula generator

Describe what you need and get a working LET formula for Excel and Google Sheets, tested on real data before you copy it. LET gives names to values or calculations inside a single formula, then uses those names in a final calculation.

The generator is switching on soon. Meanwhile, the examples below are all tested.

Tested LET examples

Each formula below was calculated on its own sample sheet. Open one to see the sheet, why it works, and to try it yourself.

Show a blank instead of 0

=LET(t,SUMIFS($C$2:$C$7,$B$2:$B$7,E2),IF(t=0,"",t))

Excel · result on the sample sheet: 5 rows (F2:F6)

Scale values to 0-100%

=(B2-MIN($B$2:$B$9))/(MAX($B$2:$B$9)-MIN($B$2:$B$9))

Excel · result on the sample sheet: 8 rows (C2:C9)

Group invoices into aging buckets

=LET(days,$G$1-B2,IFS(days<=0,"Current",days<=30,"1-30",days<=60,"31-60",days<=90,"61-90",TRUE,"Over 90"))

Excel · result on the sample sheet: 7 rows (D2:D8)

Interpolate between values in a lookup table

=LET(i,MATCH(E1,A2:A8,1),dLo,INDEX(A2:A8,i),dHi,INDEX(A2:A8,i+1),vLo,INDEX(B2:B8,i),vHi,INDEX(B2:B8,i+1),vLo+(E1-dLo)*(vHi-vLo)/(dHi-dLo))

Excel · result on the sample sheet: 262.3

Questions

What does the LET formula generator do?

You describe the task in plain English, and it writes the formula, using LET where that's the right tool, for your table or a sample one. The formula is run in our engine in Excel and Google Sheets mode before you see it, so you get its result, not just a guess.

What does LET do?

LET gives names to values or calculations inside a single formula, then uses those names in a final calculation.

Can I learn to write LET formulas myself?

Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the LET function page has a practice exercise.

More formula generators