Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
days in a month
One way
=DATE(YEAR(I4),MONTH(I4)+1,1)-DATE(YEAR(I4),MONTH(I4),1) -- Don Guillett Microsoft MVP Excel SalesAid Software "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 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel to make the days cary over month to month automaticly | New Users to Excel | |||
Number of days in month counted from shortened name of month & yea | Excel Worksheet Functions | |||
Days per month for calculating storage days | Excel Worksheet Functions | |||
function to fill all days of month to end of month | Excel Worksheet Functions | |||
function to fill all days of month to end of month | Excel Worksheet Functions |