Ravindra BagaleCourses & study guides मराठी Track your progress

9. Dynamic Arrays

9.6 LET

LET to name parts of a formula with example — in 30 seconds

What: LET gives names to parts of a formula. Each part is calculated once and the formula reads like a sentence.

Why: Without LET, the same SUMIFS is typed twice: once to test for zero and once to divide. That is slow and easy to break.

Tiny example: Average order value for Pune: s = ₹544, n = 4, so s/n = 136.

First look at the data (before → after):

LET to name parts of a formula with example: before and after tables, fictional FreshGo Maharashtra data

Expected result — Average order value (₹)

M1 s n M2 = s/n
Pune 544 4 136
Nashik 360 2 180
Solapur 1,299 1 1299

About this data: Teaching sample for a fictional shop “Pearl Textiles”. Figures and names (e.g. Neha Shah) are made up for this lesson on let.

Before table and formula as text

Before — Inputs: M1 holds the city

M1 Total s Orders n
Pune 544 4
Nashik 360 2
Solapur 1,299 1

About this data: Demo table only — not real customer or company data. Built to practise let.

Formula / click path

M2: =LET(s, SUMIFS(tblMini[Amount],tblMini[City],M1), n, COUNTIFS(tblMini[City],M1), IF(n=0,"No orders",s/n))

Do it step by step:

  1. Type Pune in M1.
  2. In M2, type =LET( and name the first part: s, SUMIFS(tblMini[Amount],tblMini[City],M1),.
  3. Name the second part: n, COUNTIFS(tblMini[City],M1),.
  4. Finish with the result: IF(n=0,"No orders",s/n)) and press Enter.
  5. Change M1 to Nashik and then Solapur. Check 180 and 1299.

=LET(name1, value1, [name2, value2, …], calculation) gives names to parts of a formula: easier to read, and each part is calculated once.

Without LET:

=IF(SUMIFS(tblMini[Amount],tblMini[City],M1)=0,"No sales",SUMIFS(tblMini[Amount],tblMini[City],M1)/COUNTIFS(tblMini[City],M1))

With LET:

=LET(city,  M1,
     sales, SUMIFS(tblMini[Amount], tblMini[City], city),
     cnt,   COUNTIFS(tblMini[City], city),
     IF(sales=0, "No sales", sales/cnt))

For M1 = Pune: sales 544, cnt 4 → AOV 136. Use Alt + Enter in the formula bar to put each name on its own line.

Ravindra Bagale's Tip

When writing a big formula, many students write the same SUMIFS three or four times – it's slower, and if you forget to change it in one place, it goes wrong. In LET, give it a name once and reuse it. Keep names short but meaningful (sales, cnt) – names that look like cell addresses (A1) don't work.

Practice tasks (10+)

Try these on a blank sheet. Open a hint only if you are stuck. No quiz — just practice.

1. Rebuild the smallest example of let on a blank sheet for Skyline Clinics.

Hint: Use only the steps on this page. Keep numbers numeric.

2. Change one input for Sana Sheikh and confirm the result updates.

Hint: If the result is stuck, check absolute vs relative references.

3. Repeat the same steps with a £ or € value for Yuki Tanaka.

Hint: Formatting must not break SUM.

4. Write the result meaning in one plain sentence next to the cell.

Hint: Imagine explaining it to a new joiners.

5. Add a second row and fill the method down.

Hint: Double-click the fill handle if the pattern is consistent.

6. Break the example on purpose, then fix it using this lesson.

Hint: Common break: text instead of a number.

7. Apply let to a 5-row made-up Skyline Clinics table.

Hint: Keep column headers clear.

8. Check your answer with a simple total or COUNT.

Hint: A wrong total usually means a format or key mismatch.

9. Swap ₹ and $ on one column and re-check totals.

Hint: Stored values stay the same; only the display changes.

10. List two mistakes beginners make with let.

Hint: Look back at the tip box on this page.

11. Teach the steps out loud in under one minute.

Hint: Why → What → How.

12. Save the sheet as SkylineClin_practice.xlsx.

Hint: Use a clear file name for class.

Quick revision cards

Three standalone cards. Each one explains the idea with its own example. Scan the QR to open this lesson.

Revision card 1: What is Let?
Card 1: What is Let? · Download PNG
Revision card 2: Tiny example — Let
Card 2: Tiny example — Let · Download PNG
Revision card 3: Checklist — Let
Card 3: Checklist — Let · Download PNG