Days of a given month

G

Guest

Hi!

Can anybody help me?
I need to get the number of days on a given month-year. (ie Jan-07 = 31
days, etc)

Is there an easy way to get it?

Thnx
 
G

Guest

Put a date in a1 and this will return the days in the month od that date

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

Mike
 
T

Trevor Shuttleworth

If the date is in cell D6, the following formula in E6 formatted as "dd"
will give you the number of days.

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

It would need to be a "proper date", for example, 16/02/2007. This would
display as 28

Regards

Trevor
 
R

Rick Rothstein \(MVP - VB\)

Can anybody help me?
I need to get the number of days on a given month-year. (ie Jan-07 = 31
days, etc)

Is there an easy way to get it?

=DAY(DATE(YearNumber,MonthNumber+1,0))

Put the year number in the first argument, the month number PLUS one in the
second argument and zero in the third argument.

Rick
 

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