Last day of month for a date

Date March 6, 2008

When you create a date with the day part of 0, excel uses the last day of the previous month.

=DATE(YEAR(A1),MONTH(A1)+1,0)

Number of days in the month for a cell:

=DAY(DATE(YEAR(A1),MONTH(A1)+1,0))

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>