Sub topic 13
Checks that catch broken timelines
A timeline is the one part of a model that every other row depends on. A wrong date does not always produce an error. It can quietly misplace a payment, shorten a period, or drop a month from an annual total. This chapter adds checks that make those faults visible.
It assumes you have built the monthly timeline from the earlier chapters. That means a start date in C2, a fiscal year-end month in C3, period start, end and days in rows 5 to 7, a counter in row 8, a fiscal year-end date in row 9, annual columns in row 14, and monthly revenue in row 20. The monthly columns run from D to AM, which is 36 months.
What a timeline check is
A check is a formula that tests a property the timeline must always have. It returns a pass or fail result that you can see without reading every date.
Good timeline checks share four traits:
- Each tests one property, so a failure points to one kind of fault.
- Each is independent of the formulas it tests. A check that reuses the same logic as the row it tests can fail to catch a logic error.
- Each returns a number of failures, where 0 means pass. These roll up easily into one master check.
- Each sits visibly on the sheet, not in a hidden corner.
Check 1: continuity
Every period must start the day after the previous period ends. A gap drops days from the model. An overlap counts days twice.
E11: =E5-D6Copy this right. Every cell must equal 1. If someone overtypes E5 with 2-Feb-2025, the cell shows 2 and you can see the gap.
Check 2: period ends are month ends
Every period end must be the last day of its month.
D12: =D6=EOMONTH(D6,0)Copy this right. Every cell must be TRUE.
Continuity cannot replace this check. Suppose the period-end row was built by chaining EDATE from a month end:
D6: =EOMONTH(C2,0) -> 31-Jan-2025
E6: =EDATE(D6,1) -> 28-Feb-2025
F6: =EDATE(E6,1) -> 28-Mar-2025 (should be 31-Mar-2025)Row 5 derives each start from the previous end plus one day. March therefore starts on 1-Mar and ends on 28-Mar, April starts on 29-Mar, and the continuity check passes. Only the month-end check shows the fault. The fault also shortens March by three days and lengthens April by three, so any day-count calculation, such as interest, is wrong.
Check 3: days in period add up
The days row must cover the whole timeline exactly once.
=ABS(SUM($D$7:$AM$7)-($AM$6-$D$5+1))The result must be 0. The expression $AM$6-$D$5+1 is the number of calendar days from the first start to the last end, counted independently of the days row. A broken row 7 formula, such as one that omits the +1, makes the two sides disagree by the number of columns.
For full monthly periods you can also test that days equal the day number of the period end:
=D7=DAY(D6)Check 4: the counter increments
=SUMPRODUCT(--($E$8:$AM$8<>$D$8:$AL$8+1))+($D$8<>1)This counts the columns where the counter does not rise by exactly 1, plus one if the counter does not start at 1. A pasted value or a copied block that restarts the counter shows up here.
Check 5: fiscal year-end dates are consistent
Each column's fiscal year-end date must fall in the fiscal year-end month, and it must not be earlier than the period it belongs to.
=SUMPRODUCT(--(MONTH($D$9:$AM$9)<>$C$3))+SUMPRODUCT(--($D$9:$AM$9<$D$6:$AM$6))The result must be 0. This catches a wrong MOD argument and a row 9 formula that was anchored without the dollar signs on $C$3.
Check 6: annual totals tie to monthly totals
The annual roll-up must contain every monthly value once.
=ROUND(ABS(SUM($D$20:$AM$20)-SUM($D$15:$H$15)),2)The result must be 0. The ROUND stops floating-point noise from reporting a false failure. This check catches a wrong or missing annual column, such as a start date that places the first month in a fiscal year the annual row does not list. It also catches a SUMIFS that compares against the wrong row.
The annual headers must also be correct. A related test confirms that the final annual column ends on or after the last monthly period:
=MAX($D$14:$H$14)>=$AM$6This must be TRUE. If it is FALSE, the annual block stops before the model does.
Check 7: inputs are valid
The timeline is driven by two inputs, so test them.
=IFERROR(--NOT(AND(ISNUMBER($C$2),ISNUMBER($C$3),$C$3>=1,$C$3<=12,$C$3=INT($C$3))),1)The result is 0 for valid inputs and 1 otherwise. ISNUMBER rejects dates typed as text, because Excel stores those as text and not as serial numbers. The range test matters because MOD($C$3-MONTH(D6),12) hides a month number of 13. It treats 13 like 1 and returns a plausible but wrong fiscal year end.
You can also restrict C3 with data validation, which prevents the bad entry. Keep the check as well, because pasted values bypass validation.
Check 8: no errors in the timeline
Errors can make other checks pass silently. COUNTIF(range,FALSE) does not count an error cell as FALSE. If D6 returns #VALUE!, the month-end test returns #VALUE!, not FALSE, and the count stays at 0. Test for errors directly:
=SUMPRODUCT(--ISERROR($D$5:$AM$12))Assemble a check block
Put the checks in one block with a master result. This example uses rows 24 to 32.
B24: Errors in timeline C24: =SUMPRODUCT(--ISERROR($D$5:$AM$12))
B25: Inputs valid C25: =IFERROR(--NOT(AND(ISNUMBER($C$2),ISNUMBER($C$3),$C$3>=1,$C$3<=12,$C$3=INT($C$3))),1)
B26: Continuity C26: =COUNTIF($E$11:$AM$11,"<>1")
B27: Month ends C27: =COUNTIF($D$12:$AM$12,FALSE)
B28: Days add up C28: =ABS(SUM($D$7:$AM$7)-($AM$6-$D$5+1))
B29: Counter C29: =SUMPRODUCT(--($E$8:$AM$8<>$D$8:$AL$8+1))+($D$8<>1)
B30: Fiscal year ends C30: =SUMPRODUCT(--(MONTH($D$9:$AM$9)<>$C$3))+SUMPRODUCT(--($D$9:$AM$9<$D$6:$AM$6))
B31: Annual tie-out C31: =ROUND(ABS(SUM($D$20:$AM$20)-SUM($D$15:$H$15)),2)
B32: Master check C32: =IFERROR(IF(SUM(C24:C31)=0,"OK","CHECK"),"CHECK")The IFERROR in C32 matters. If any check returns an error, SUM also returns an error, and the master check must fail, not show an error that a reader might skip. Link C32 to the top of the sheet or the model's summary page so a failure is seen.
Which check catches which fault
No single check catches every fault. This table shows why the block needs all of them.
| Fault | Caught by |
|---|---|
| A start date overtyped with a wrong value | Continuity |
| Period ends chained with EDATE, so they drift off month ends | Month ends, days add up |
| Row 7 formula missing the `+1` | Days add up |
| A hardcoded counter value | Counter |
| Fiscal year-end month entered as 13 | Inputs valid |
| Start date typed as text | Inputs valid, errors |
| Annual columns that stop early | Annual tie-out |
| Wrong `SUMIFS` criteria row | Annual tie-out |
Stub periods and the checks
The timeline in this chapter uses full months, so the first period starts on the first day of the start month. If your model has a stub, meaning a first period that starts on the actual start date, set D5 to C2 instead of EOMONTH(C2,-1)+1. Continuity, the days total and the annual tie-out still apply unchanged. The =D7=DAY(D6) test no longer holds for the first column, so apply it from column E onward.
Dated events
Dated events such as payments and maturities need their own check, because they can fall outside the timeline. If the payment date is in F4 and the timeline runs from D5 to AM6, this test confirms that the date lands in exactly one period:
=COUNTIFS($D$5:$AM$5,"<="&F4,$D$6:$AM$6,">="&F4)=1The result must be TRUE. A result of FALSE means the date is outside the timeline, or that the periods overlap or leave a gap, which continuity should already have flagged.
Exercise
A modeller builds the period-end row with E6: =EDATE(D6,1) and copies it right from D6: =EOMONTH(C2,0), where C2 is 15-Jan-2025. Row 5 uses E5: =D6+1. Which of the checks in this chapter pass, and which fail? State the failing period.
Show answer
The continuity check passes, because each start is the previous end plus 1 by construction. The days-add-up check also passes, because it compares row 7 with the dates in rows 5 and 6, which agree with each other. The month-end check fails from February onward in the first period that drifts: E6 is 28-Feb-2025, a true month end, so it passes, but F6 is 28-Mar-2025, so F12 is FALSE. Later columns keep failing where the drifted date is not a month end. Only the month-end check catches the fault.
Exercise
The master check shows OK, but you find the annual block lists only four fiscal years while the monthly timeline spans five. Which check should have failed, and what change to the check block would catch this in future?
Show answer
The annual tie-out should have failed, because the fifth year's monthly revenue is missing from the annual total. It passes only if the missing months hold zero revenue, or if the tie-out sums the annual range with the same incomplete range. Add the test =MAX($D$14:$H$14)>=$AM$6, which fails when the last annual column ends before the last monthly period, and include it in the master check.