#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 44
Default days in a month

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
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default days in a month

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.

Nikhil wrote:

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


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default days in a month

A couple mo

=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))



--
Biff
Microsoft Excel MVP


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



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default days in a month

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

=DAY(EOMONTH(A1,0))

Mike

"Nikhil" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel to make the days cary over month to month automaticly GARY New Users to Excel 1 April 19th 08 06:05 PM
Number of days in month counted from shortened name of month & yea Tumar Excel Worksheet Functions 6 September 18th 07 03:36 PM
Days per month for calculating storage days Bart Excel Worksheet Functions 3 January 31st 07 06:40 PM
function to fill all days of month to end of month Monique Excel Worksheet Functions 11 May 1st 06 07:39 PM
function to fill all days of month to end of month YaHootie Excel Worksheet Functions 10 May 1st 06 06:01 AM


All times are GMT +1. The time now is 07:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"