Sub topic 3
Moving by months with EDATE and EOMONTH
This chapter assumes you can enter formulas, use absolute and relative references, and apply number formats. It covers month arithmetic, elapsed time, business days, whole-column formulas, locale and time zone settings, volatile functions, and common errors.
Moving by months with EDATE and EOMONTH
EDATE(start, months) adds whole months to a date. EOMONTH(start, months) returns the last day of the month that is the given number of months away.
=EDATE(DATE(2026, 1, 31), 1) → 2026-02-28
=EOMONTH(A2, 0) → last day of A2's monthEDATE clamps to the last valid day when the target month is shorter, so January 31 plus one month gives February 28.
Measuring elapsed years and months
DATEDIF(start, end, unit) returns complete units. Use "Y" for years, "M" for months and "D" for days. YEARFRAC(start, end) returns a fraction of a year, which suits interest and pro-rated calculations.
Counting and scheduling business days
NETWORKDAYS(start, end, holidays) counts weekdays inclusive. WORKDAY(start, days, holidays) returns the date a number of working days later.
=NETWORKDAYS(A2, B2, Holidays!A2:A20)
=WORKDAY(A2, 10, Holidays!A2:A20)Applying date formulas to whole columns
Wrap a formula in ARRAYFORMULA to fill a column without copying it down. Blank rows are skipped by the IF.
=ARRAYFORMULA(IF(A2:A="", "", EOMONTH(A2:A, 0)))Locale and time zone settings
Text such as 11/28/2026 is parsed according to the spreadsheet's locale. In a locale that reads day first, the same text gives a different date. Set the locale and time zone under File > Settings. The time zone controls what TODAY() and NOW() return.
Volatile functions and when they recalculate
TODAY() and NOW() recalculate on every edit, so formulas that depend on them change daily. Use a fixed date for records that must not change.
Troubleshooting date problems
| Symptom | Likely cause | Fix |
|---|---|---|
| `#VALUE!` in a date formula | Cell holds text that looks like a date | Use `DATEVALUE` or re-enter with `DATE` |
| Date is left-aligned | Value is text | Convert it with `DATEVALUE` |
| Day and month swapped | Locale mismatch | Check File > Settings locale |
| `TODAY()` is a day off | Time zone mismatch | Check File > Settings time zone |
Exercise
Exercise
A2 holds 2026-01-31. What does =EDATE(A2, 1) return, and why?
Show answer
It returns 2026-02-28. February has no 31st, so EDATE clamps to the last valid day of the target month.