• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to get number of days in month if we know month and year

ThrottleWorks

Excel Ninja
Hi,
I need to derive number of days in a month if I know month and year.
For example, month = 5 and year = 2017 so result will be 31.

In case of April, result will be 30, for leap year, February will be 29.
Can anyone please help me in this,
PS - I can do away with leap year condition for the time being.
 
Hi !

Or as usual easy logic first day of next month minus first day of month :

=DATE(2017,5,1)-DATE(2017,4,1)
 
Back
Top