![]() |
Days in a month
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 ! |
Days in a month
Hi,
Use following formula : =DAY(DATE(YEAR(A1),MONTH(A1)+1,0)) HTH |
Days in a month
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 ! |
Days in a month
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 ! |
Days in a month
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 ! |
Days in a month
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 ! |
Days in a month
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 ! |
Days in a month
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 |
All times are GMT +1. The time now is 03:11 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com