To get the last day of the prior month, use: To get the last day of the next month, use:

Alternative formula

You can also write a formula using the DATE, YEAR and MONTH functions to return the last day of the month: The trick with this formula is supplying zero for the day. When you supply zero as the day argument to DATE, the date function will “roll back” one day to the last day of the previous month. So, by adding 1 to the month, and using zero for day, DATE returns the last day of the “original” month. Although EOMONTH is a more convenient function, it won’t accept a range of dates in an array formula. In that case, you can use the alternative above.

Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.