DesktopSelf Management

Excel Formula to calculate Number Of Days in a Month

Requirements: You want to build a calculator sheet that requires you to input number of days in a given month.

Solution: Excel doesn’t have any built-in function to return the number of days in a month.  I’ve learned below two formulas that does the job. Both of them requires a date input and will return the number of days in the month that date belongs to. Hopefully this may come handy for you.

=DAY(EOMONTH(B5,0))
=DAY(DATE(YEAR(B5),MONTH(B5)+1,1)-1)

  A Sample table to display number of days in all months of this year 2016.

image

 

References:

Number-of-Days-Calculator:

 

 

     
Advertisements