Sub topic 1
Monthly and Annual Model Timelines with EOMONTH and EDATE
Prerequisites
This chapter assumes you can write basic Excel formulas, use relative and absolute cell references, and use the DATE, YEAR, MONTH and DAY functions.
Dates are numbers: serial values and formatting
Excel stores every date as a serial number. Serial 1 is 1-Jan-1900, and each later day adds 1. For example, 15-Jan-2025 is stored as 45672. A date is a number with a date format applied, so one value can display in different ways.
Timeline cells need a date format. Without one, Excel shows 45672 instead of 15-Jan-2025. Arithmetic still works on the raw number, so subtracting two dates returns a day count.
=DATE(2025,1,15) -> 45672 (format as dd-mmm-yyyy)
=DATE(2025,2,1)-DATE(2025,1,15) -> 17EOMONTH: the last day of a month, shifted by n months
EOMONTH(start, months) returns the last day of the month that is months after the start date. A value of 0 returns the last day of the start date's own month.
=EOMONTH(DATE(2025,1,15),0) -> 31-Jan-2025
=EOMONTH(DATE(2025,1,15),1) -> 28-Feb-2025
=EOMONTH(DATE(2025,1,15),-1) -> 31-Dec-2024EDATE: the same day, shifted by n months
EDATE(start, months) keeps the day number and changes only the month.
=EDATE(DATE(2025,1,15),1) -> 15-Feb-2025
=EDATE(DATE(2025,1,15),-1) -> 15-Dec-2024What happens when the day does not exist
When the target month has fewer days, EDATE returns that month's last day instead of an error. It always counts from the original date, so a clamped result does not carry forward.
=EDATE(DATE(2025,1,31),1) -> 28-Feb-2025
=EDATE(DATE(2024,1,31),1) -> 29-Feb-2024
=EDATE(DATE(2025,1,31),2) -> 31-Mar-2025Exercise
What does =EDATE(DATE(2024,1,31),1) return, and why?
Show answer
29-Feb-2024. January 31 plus one month targets February. February 2024 has 29 days because 2024 is a leap year, so EDATE returns the last day of February.