w3resource

Excel EOMONTH() function

EOMONTH() function

This function is used to return the serial number for the last day of the month that is the indicated number of months before or after start_date.

Version: Excel 2013

Syntax:

EOMONTH(start_date, months)

Parameters:

Name Description Data Type Required/
Optional
Start_date A date that represents the starting date. Dates should be entered by using the DATE function, or as results of other formulas or functions. Date Required
Months The number of months before or after start_date. A positive value for months yields a future date; a negative value yields a past date. Date Required

The point to be remembered that, if months is not an integer, it is truncated.

Remarks

  • Microsoft Excel stores date as sequential serial numbers so they can be used in calculations. By default, January 1, 1900, is serial number 1, and January 1, 2010, is serial number 40179 because it is 40178 days after January 1, 1900.
  • when start_date is not a valid date, EOMONTH returns the #NUM! error value.
  • when start_date plus months yields an invalid date, EOMONTH returns the #NUM! error value.

Example - 1:

The example below finds the date of the last day of the month, one month after the date specified in A2.

eomonth1

Example - 2:

The example below finds the date of the last day of the month, three months before the date specified in A2.

eomonth2

Previous: Excel EDATE() function
Next: Excel HOUR() function



Follow us on Facebook and Twitter for latest update.