ExcelFunctions.net Logo

The Excel EOMONTH Function

Home » Excel-Built-In-Functions » Excel-Date-And-Time-Functions » Excel-Eomonth-Function
Search this site:
Custom Search
Related Function :

Basic Description

The Excel EOMONTH function returns a date that is the last day of the month which is a specified number of months before or after an initial supplied start date.

The format of the function is :

EOMONTH( Start_date, Months )

where the arguments are as follows :

Start_date - The initial date
Months - The number of months to add to (or subtract from) the Start_date before returning the last day of the resulting month


Note that the Start_date argument should be input as either:

  • A reference to a cell containing a date
or
  • A date returned from a formula

Warning: If you attempt to input the Start_date as text, there is a chance that Excel may misinterpret this due to different date systems, or date interpretation settings.

Also, be aware that it is not recommended to input dates as serial numbers, as the serial numbers may vary across different computer systems.


Example

The following spreadsheets show examples of the Eomonth function.

The spreadsheet on the left shows the function formats and the spreadsheet on the right shows the results.

 Formulas
  A B
1 01-01-2008 =EOMONTH( A1, 9 )
2 01-01-2008 =EOMONTH( A2, -12 )
3 01-01-2008 =EOMONTH( A3, 0 )
4 29-02-2008 =EOMONTH( A4, 12 )
5 28-02-2007 =EOMONTH( A5, 12 )
 Results
  A B
1 01-01-2008 31/10/2008
2 01-01-2008 31/01/2007
3 01-01-2008 31/01/2008
4 29-02-2008 28/02/2009
5 28-02-2007 29/02/2008

Note how you can use negative values for the Months argument, to get a date that is before the supplied Start_date. You can also set the Months argument to zero, to get the last day of the original Start_date.


Further examples of the Excel Eomonth function can be found on the Microsoft Office website.



Common Error

If your Eomonth functions returns the Excel #NUM! error, this is likely to be due to one of the following :

Either:
  • The supplied Start_date argument is not recognised as a valid date
or
  • The supplied Start_date plus Months results in an invalid date






Valid XHTML 1.0 Transitional

Disclaimer Privacy Policy

Copyright © 2008-2010 ExcelFunctions.net