Days in month

Summary
Explanation
The DAY function returns the day component of a date. The EOMONTH function returns the last day of the month for a given date. So, in this formula EOMONTH first returns a date corresponding to the last day of the month, and then DAY returns the date value for that date.
By definition, the value returned by DAY is always equal to the number of days in the month, since the date supplied to DAY is always the last day.
Download 200+ Excel Shortcuts
Get over 200 Excel shortcuts for Windows and Mac in one handy PDF.