← Learning Hub
Advanced

What-If Analysis, LET and LAMBDA

Spreadsheets are great for planning: "what price do I need to reach ₹50,000?", "what will my EMI be at different interest rates?". What-If tools answer these without trial and error. LET and LAMBDA, meanwhile, make long formulas readable and reusable - bringing some of the power of programming into Excel.

Goal Seek: work backwards

You know the answer you want and need the input. Example: "What price gives a total of ₹50,000 if I sell 120 units?"

  • B1 = price, B2 = units (120), B3 = =B1*B2.
  • Data → What-If Analysis → Goal Seek.
  • Set cell: B3. To value: 50000. By changing cell: B1.
  • Excel finds a price of about ₹416.67.

Data Tables: many answers at once

What-If Analysis → Data Table fills a grid with the result for many inputs - e.g. EMI for different loan amounts and interest rates, using =PMT(rate/12, months, -loan).

Example
=PMT(9%/12, 60, -500000)        → about 10,379 per month (₹5 lakh, 9% a year, 5 years)

LET: name parts of a formula

LET gives names to values inside one formula. Long formulas become readable, and repeated parts are calculated once.

Example
Without LET:
=IF(SUM(D2:D100)*1.18>100000, SUM(D2:D100)*1.18*0.95, SUM(D2:D100)*1.18)

With LET:
=LET(total, SUM(D2:D100) * 1.18,
     IF(total > 100000, total * 0.95, total))

LAMBDA: your own functions

LAMBDA builds a reusable function. Save it in Formulas → Name Manager with a name, and use it anywhere in the workbook.

Example
Name:      WITHGST
Refers to: =LAMBDA(amount, [rate], amount * (1 + IF(ISOMITTED(rate), 18%, rate)))

=WITHGST(1000)          → 1180
=WITHGST(1000, 5%)      → 1050
LET and LAMBDA need Excel 365 (or Excel 2021 for LET, Excel 2024 for LAMBDA). Check your version under File → Account.
Key points
  • Goal Seek finds the input for a target result.
  • Data Tables show results for many inputs at once.
  • LET names parts of a formula; LAMBDA creates your own functions.

📝 Test yourself

1. Which tool finds the input needed for a target result?
2. What does LET do?
3. Fill in the function that calculates a loan EMI:
=(9%/12, 60, -500000)