The revolver solves one problem. The balance sheet needs a cash number for FY26, and cash is a residual, whatever the flows leave behind. But a real company's cash can't go below the level it needs to operate. Kaveri's board policy sets a ₹50 crore minimum, for payroll, imprest floats, and comfort for the banks. Surplus cash above that level shouldn't sit idle while a 10% facility runs a balance either. So the model needs a two-way valve. When flows leave cash short of the floor, draw the revolver by the shortfall. When flows leave surplus above the floor, sweep it into revolver repayment until the revolver is gone. That valve, a cash sweep with a minimum-cash floor, is the last moving part, and it's built from nothing but MAX and MIN.
M rows 91 to 99, with the header in 91:
| M row | Line | Formula in F (fill right) | Note |
|---|---|---|---|
| 92 | Cash before revolver | =F98+F53+F56+F58+F60+F61 | Opening cash + CFO + CFI + all financing except the revolver (rows 58, 60, 61 already carry negative signs, so add them, don't subtract) |
| 93 | Revolver, opening | =E34 | Daisy chain |
| 94 | Surplus / (shortfall) vs minimum | =F92-A!$C$10 | The single number the valve reads |
| 95 | Revolver draw | =MAX(0,-F94) | Shortfall of 31.3 → draw 31.3; surplus → 0 |
| 96 | Revolver repayment | =-MIN(F93,MAX(0,F94)) | Repay the smaller of what you owe and what you can spare; carries a negative sign |
| 97 | Revolver, closing | =F93+F95+F96 | |
| 98 | Cash, opening | =E24 | Daisy chain |
| 99 | Cash, closing | =F92+F95+F96 | Cash before revolver, corrected by the valve |
Now close the machine. Link the balance sheet: F24 =F99 and F34 =F97, filled right. The CFS revolver row 59 (=F34-E34) springs to life through the BS link. The moment you enter F34, the whole forecast block computes, and row 43 goes 0.0, 0.0, 0.0, 0.0, 0.0 across the forecast, and row 67 with it.
Stop and look at that for a second. Eight columns of balance sheet, five of them forecast, every one balancing to zero with no plug anywhere in the workbook. It's the closed loop you once traced by hand, industrialized.
Advertisement
Worked example: the valve in three states
Walk the valve through its three states, using the numbers your model now shows under each scenario. You'll flip the switch properly soon. By the end, the MAX/MIN logic should feel like intuition instead of incantation:
- Base, FY26: surplus, nothing to sweep. Cash before revolver is 97.7, so the surplus vs floor is +47.7. Draw = MAX(0, −47.7) = 0. Repayment = −MIN(0, 47.7) = 0, since nothing is outstanding. Cash closes at 97.7. Across the base case the revolver row runs 0, a facility on standby.
- Bear, FY26: shortfall, the draw. Cash before revolver is 18.7, because the working-capital trap in the bear assumptions eats the year and CFO collapses to 11.5. That's a shortfall vs floor of −31.3, so the draw is 31.3. Cash closes at 50.0, pinned to the floor, to the paisa, by construction. Your balance sheet balances because the revolver absorbed the gap, and that's how "cash is the residual" works once a liability can take up the slack.
- Bear, FY27 to FY28: the sweep. In FY27 cash before revolver is 53.6, a surplus of 3.6. Repayment = −MIN(31.3 outstanding, 3.6 spare) = −3.6, so the revolver drops from 31.3 to 27.7 and cash is pinned at 50.0 again. FY28 brings recovery. A surplus of 34.4 repays the remaining 27.7 in full and the revolver hits 0. Cash finally lifts off the floor to 56.7. Draw, sweep, release: the full life cycle in three columns.
What does a simple cash sweep assume?
One subtlety is worth naming. Your sweep is mandatory and total as built, so every spare rupee above the floor repays the revolver before anything else. Real facilities vary. Some sweep 50% of excess cash flow, and the LBO waterfalls you'll build later sweep by tranche seniority. To extend the architecture, insert a "% swept" input into row 96. And notice that the model still pays dividends while drawing the revolver in bear-FY26, with ₹10.3 cr going out and ₹31.3 cr drawn. That's mechanically fine. Economically, it's a board decision your model made without asking anyone. A modeler notices what the machine assumed, and an analyst asks whether the board would really do it. Write that observation in the README. It'll come back as a mastery-check question, and for the rest of your career.
Checkpoint 6 (Base). Cash closing FY26 to FY30: 97.7 · 108.7 · 126.2 · 150.8 · 183.1. Revolver 0.0 throughout, balance check 0.0 throughout, CFS check 0.0 throughout. If any check is non-zero, go straight to the fault-trace protocol, and don't start tinkering first.