Sub topic 2
Which Function to Use, and Why Period Columns Use Month Ends
Prerequisites
This chapter assumes you know basic Excel formulas, relative and absolute cell references, and a column-based model layout with periods across the columns. You should also be comfortable with SUMIFS and the YEAR, MONTH and DAY functions.
Choosing between EOMONTH and EDATE
EOMONTH returns the last day of a month, shifted by a number of months. EDATE returns the same day number, shifted by a number of months. Both return serial numbers, so format the result cells as dates.
Use EOMONTH for period columns. A month-end anchor always lands on the true last day of the target month. Use EDATE for dated events, such as a payment that falls on the same day each month.
| Need | Function | Example | Result |
|---|---|---|---|
| Period end date | EOMONTH | =EOMONTH(DATE(2025,1,15),1) | 28-Feb-2025 |
| Same-day payment date | EDATE | =EDATE(DATE(2025,1,15),1) | 15-Feb-2025 |
| Day that does not exist in target month | EDATE | =EDATE(DATE(2025,1,31),1) | 28-Feb-2025 |
=EOMONTH(DATE(2025,1,15),1) -> 28-Feb-2025
=EDATE(DATE(2025,1,31),1) -> 28-Feb-2025Building the monthly timeline from one start-date input
Put one model start date in an input cell, C2. Derive every period from that cell so that changing the start date updates the whole timeline.
Inputs: C2 = model start date (e.g. 15-Jan-2025)
Row 5 (period start): D5: =EOMONTH(C2,-1)+1 E5: =D6+1
Row 6 (period end): D6: =EOMONTH(C2,0) E6: =EOMONTH(D6,1)Each later period end steps from the previous column, so the timeline never depends on a clamped day.
Period start, period end and days in period
Row 7 counts the days in each period. Copy this formula across the row.
Row 7 (days): D7: =D6-D5+1For a January 2025 start, D7 returns 31.
Period counters and year flags
Row 8 numbers the periods. Enter 1 in D8, then copy E8 as =D8+1.
Row 9 finds the fiscal year end for each month. Input C3 holds the fiscal year-end month number, for example 6 for June.
Inputs: C3 = fiscal year-end month number (e.g. 6)
Row 9 (fiscal year end): D9: =EOMONTH(D6,MOD($C$3-MONTH(D6),12))
Row 10 (fiscal year): D10: =YEAR(D9)MOD counts the months from the period end to the fiscal year-end month. EOMONTH then lands on that year's fiscal year-end date, and YEAR labels the fiscal year.
Exercise
What does =EOMONTH(DATE(2025,1,15),-1) return?
Show answer
31-Dec-2024. A shift of -1 moves back to the end of the previous month.