ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Days of a given month (https://www.excelbanter.com/excel-discussion-misc-queries/146383-days-given-month.html)

Jepane

Days of a given month
 
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

Mike H

Days of a given month
 
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

"Jepane" wrote:

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


Trevor Shuttleworth

Days of a given month
 
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


"Jepane" wrote in message
...
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




Rick Rothstein \(MVP - VB\)

Days of a given month
 
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


Jepane

Days of a given month
 
Thanx

"Mike H" wrote:

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

"Jepane" wrote:

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


Mike H

Days of a given month
 
One suggestion
=WORKDAY(A1,15)

in B1

Mike


"Jepane" wrote:

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


Rick Rothstein \(MVP - VB\)

Days of a given month
 
One suggestion
=WORKDAY(A1,15)


To the newsgroup administrators:

Please move this response down one thread.

Thank you,

Rick

<g

Teethless mama

Days of a given month
 
Required Analysis ToolPak add-ins

=DAY(EOMONTH(A1,0))


"Jepane" wrote:

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



All times are GMT +1. The time now is 06:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com