Description
Use this function to return the last day of the month, n months in the past or future. This is useful for calculating maturity dates or due dates that fall on the last day of the month.
Syntax
(start_date, months)
Inputs
This function has the following arguments:
Name | Required | Valid input |
---|---|---|
start_date |
Yes | The date that the result is to be calculated from. This can be a cell reference, an integer date, or a date in the format DD/MM/YYYY or YYYY/MM/DD. A formula which results in one of these is also acceptable. |
months |
Yes | The number of months before or after start_date . A positive value months yields a future date; a negative value yields a past date.This can be a cell reference or an integer. A formula which results in either of these is also acceptable. |
Example
Sample data
A | B | EOMONTH result |
---|---|---|
February 1, 2018 | 14 | 4/30/2019 |
April 23, 2019 | -23 | 5/31/2017 |
July 4, 2000 | 4 | 11/30/2000 |
27/19/2003 | -14 | #VALUE! |
12/23/2023 | -2400 | #NUM! |
Sample formulas
Formula | Description | Result |
---|---|---|
=EOMONTH(A3,4) |
Adds 4 months to the date in cell A1, and changes the day to the last day in the month. | 11/30/2000 |
=EOMONTH(7/19/2003,-14) |
Adds -14 months to the supplied date of 7/19/2003 , and changes the day to the last day in the month |
5/31/2002 |
=EOMONTH(A5,B5) |
Adds the number of months (-2400) to the date in cell A5. | #NUM! (out of range) |
Notes
- The Workiva platform stores dates as numbers so they can be used in calculations.
By default, January 1, 1900 = 1. - EOMONTH returns a serial number date value, which can then be formatted as a date.
- If the supplied or referenced
start_date
isn't a valid integer date or in the format DD/MM/YYYY or YYYY/MM/DD, EOMONTH returns the #VALUE! error. - If
start_date
plus months is not a valid date (typically this will be because it is out of range), EOMONTH returns the #NUM! error. - If
start_date
has a fractional time attached (that is, isn't an integer), it's removed. - If
months
isn't an integer (it contains a decimal value), it's truncated. - Wildcards don't work with this function.
Related functions
DATE
DATEVALUE
DAY
DAYS
DAYS360
EDATE
EOMONTH
MONTH
NETWORKDAYS
NETWORKDAYS.INTL
WEEKDAY
WORKDAY
WORKDAY.INTL
YEAR
YEARFRAC