EOMONTH

Function Reference: EOMONTH

Syntax
=EOMONTH(start_date,months)
Purpose / Description
Returns the end of month date a given number of months into the past or the future from a starting date.
Arguments
Name Type Description
start_date number A constant, reference to an one-cell range or a nested expression which provides the serial date number - starting date - from which the calculation is made.  If the start_date refers to an array of values, it expects that array to be horizontal.
months number A constant, reference to an one-cell range or a nested expression which provide the number of months back or forward in time from the start_date.  If 0 is provided, calculates the month-end date of the month in which start_date occurs.  If months refers to an array of values, it expects that array to be vertical.
Return Values
Type Specific Value Description
number   The month-end date for the month months before or after start_date.
error #VALUE! If either start_date or months is not a number and cannot be coerced to number.
error #VALUE! If either start_date or months is a multi-cell reference, but arranged in the wrong layout.
error #NUM! If the number passed in start_date or the result of the function is outside the range allowed
1900 date system: 0 to 2,958,465
1904 date system: 0 to 2,957,003
error   Any errors referenced by arguments are returned due to propagation of error values.
Notes / Comments / Advice / Warnings
Note: This function does not accept vertical multi-cell reference for the start_date argument. If a vertical multi-cell reference is given, the result is the #VALUE! error.  Use the TRANSPOSE function to make a vertical range horizontal, but then an outer TRANSPOSE will also be required if the result set should be vertical.
Advice: It is possible to use the EOMONTH function with a multi-cell range if a nested array expression is used, since the array handling will call the function once for each value, see the example file for a demonstration.  If nested arrays are used, normal array evaluation rules apply, and the array expression may return #N/A values, which will then be returned by EOMONTH due to the propagation or error rule.
Examples: Open / download sample workbook: EOMONTH.xlsx