Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi there,
Am looking a formulae that would return the number of days for a given month. eg : A1 = 1/1/07 ( meaning Jan ) A2 = need the number of days in Jan (result - 31) B1 = 1/11/07 ( meaning Nov ) B2 = need the number of days in Nov (result -30) Thanks -- Cheers ! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Use following formula : =DAY(DATE(YEAR(A1),MONTH(A1)+1,0)) HTH |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try one of these:
=DAY(DATE(YEAR(A1),MONTH(A1)+1,0)) If you have the Analysis ToolPak add-in installed: =DAY(EOMONTH(A1,0)) If the date you enter is *always* the 1st of the month: =DAY(A1+32-DAY(A1+32)) -- Biff Microsoft Excel MVP "Sena" wrote in message ... Hi there, Am looking a formulae that would return the number of days for a given month. eg : A1 = 1/1/07 ( meaning Jan ) A2 = need the number of days in Jan (result - 31) B1 = 1/11/07 ( meaning Nov ) B2 = need the number of days in Nov (result -30) Thanks -- Cheers ! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Here is one way to get the value...
=DAY(DATE(0,1+MONTH(A1),0)) Rick "Sena" wrote in message ... Hi there, Am looking a formulae that would return the number of days for a given month. eg : A1 = 1/1/07 ( meaning Jan ) A2 = need the number of days in Jan (result - 31) B1 = 1/11/07 ( meaning Nov ) B2 = need the number of days in Nov (result -30) Thanks -- Cheers ! |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Ignore mine... the first 0 should have been YEAR(A1) as the others have
posted. Rick "Rick Rothstein (MVP - VB)" wrote in message ... Here is one way to get the value... =DAY(DATE(0,1+MONTH(A1),0)) Rick "Sena" wrote in message ... Hi there, Am looking a formulae that would return the number of days for a given month. eg : A1 = 1/1/07 ( meaning Jan ) A2 = need the number of days in Jan (result - 31) B1 = 1/11/07 ( meaning Nov ) B2 = need the number of days in Nov (result -30) Thanks -- Cheers ! |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You need the year otherwise it'll always calculate based on Excel's
interpretation that 1900 was a leap year. A1 = 2/1/2008 =29 A1 = 2/1/2007 =29 -- Biff Microsoft Excel MVP "Rick Rothstein (MVP - VB)" wrote in message ... Here is one way to get the value... =DAY(DATE(0,1+MONTH(A1),0)) Rick "Sena" wrote in message ... Hi there, Am looking a formulae that would return the number of days for a given month. eg : A1 = 1/1/07 ( meaning Jan ) A2 = need the number of days in Jan (result - 31) B1 = 1/11/07 ( meaning Nov ) B2 = need the number of days in Nov (result -30) Thanks -- Cheers ! |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Yep... as I am sure you have seen by now, my second posting and yours
crossed in transit. Rick "T. Valko" wrote in message ... You need the year otherwise it'll always calculate based on Excel's interpretation that 1900 was a leap year. A1 = 2/1/2008 =29 A1 = 2/1/2007 =29 -- Biff Microsoft Excel MVP "Rick Rothstein (MVP - VB)" wrote in message ... Here is one way to get the value... =DAY(DATE(0,1+MONTH(A1),0)) Rick "Sena" wrote in message ... Hi there, Am looking a formulae that would return the number of days for a given month. eg : A1 = 1/1/07 ( meaning Jan ) A2 = need the number of days in Jan (result - 31) B1 = 1/11/07 ( meaning Nov ) B2 = need the number of days in Nov (result -30) Thanks -- Cheers ! |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Sat, 5 Jan 2008 22:27:00 -0800, Sena wrote:
Hi there, Am looking a formulae that would return the number of days for a given month. eg : A1 = 1/1/07 ( meaning Jan ) A2 = need the number of days in Jan (result - 31) B1 = 1/11/07 ( meaning Nov ) B2 = need the number of days in Nov (result -30) Thanks If you have the Analysis Tool Pak installed, or are using Excel 2007, you can try: =DAY(EOMONTH(A1,0)) --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
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 | |||
Dates - Several Days In a month to month only | Excel Discussion (Misc queries) |