Days in a month

  • Thread starter Thread starter helpforwork
  • Start date Start date
H

helpforwork

Is there a formula that can populate how many days there are in a month? i.e.
31 days in January, 28 days in February, and so on
 
With a date in cell A1 try the below formula
=DAY(DATE(YEAR(A1),MONTH(A1)+1,0))

If this post helps click Yes
 
If you have a date in a cell:

=DAY(EOMONTH(A1,0))

The EOMONTH function requires the Analysis ToolPak add-in be installed in
Excel versions prior to Excel 2007. If you
enter the formula and get a #NAME? error look in Excel help for the EOMONTH
function. It'll tell you how to fix the problem.
 
Is there a formula that can populate how many days there are in a month? i.e.
31 days in January, 28 days in February, and so on

With some date in A1:

=DAY(A1-DAY(A1)+32-DAY(A1-DAY(A1)+32))

Format result as General, or Number
--ron
 
Back
Top