In the example shown, the formula in cell B5 is: 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.

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.