days in a month

N

Nikhil

Hi...

I wanted to know if there is a formula to calculate the no. of days in a
month...for eg. there are 30 days in Apr, 28/29 days in Feb....

if i have a date in one cell, e.g. 15-Apr-08, in the next cell, i want the
no. of days in Apr.. i.e 30 to appear in that cell...

how do i do it?

Thanks

Nikhil
 
D

Dave Peterson

Another one:

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

The 0th day of the next month is the last day of the previous month.

And =day() just picks out that number.
 
T

T. Valko

A couple more:

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

If you're using a version of Excel prior to Excel 2007 and you have the
Analysis ToolPak add-in installed:

=DAY(EOMONTH(A1,0))

If you're using Excel 2007 (the ATP functions have been rolled into Excel
2007):

=DAY(EOMONTH(A1,0))
 
M

Mike H

And another but this one requires the analysis toolpak to be loaded

=DAY(EOMONTH(A1,0))

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top