EOMONTH returns aserial number corresponding to an Excel date.
To display the result as a date, apply anumber format of your choice.
The EOMONTH function takes twoarguments,start_dateandmonths:
Note: The EOMONTH function returns thelastday of the month.
If you want thesameday of the month, use theEDATE function.
Of course, hardcoding a date into a formula doesn’t make much sense in Excel.
A better option is to use a cell reference.
And if the date in A1 is changed, EOMONTH will generate new dates.
it’s possible for you to use negative numbers for months to create datesbeforethe start date.
The result is that EOMONTH will return the last day of the current month.
Because the TODAY function will continue to recalculate over time, this formula will always return the correct result.
For example, in the worksheet below, the goal is to sum amounts by month and by client.
For a full explanation of how this formula works,see this page.
In the worksheet below, the start date is in cell B5.
If the date in cell B5 is changed, a new list of dates will be generated.
For a more detailed explanation of this idea, seeSequence of months.