Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi all
I've got to find the number of days in a month based on a date's month number. thus, I tried the following array formula (which I am pretty sure is not right): =IF((MONTH(A14)={1,3,5,7,8,10,12}); 31; IF((MONTH(A14)={4,6,9,11}); 30; IF((MONTH(A14)=2); 28; "Error"))) but it always gives me the only result: "ERROR". Your help will be much appreciated. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this
=DAY(DATE(YEAR(A14);MONTH(A14)+1;0)) -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "catrrmg" wrote in message ... Hi all I've got to find the number of days in a month based on a date's month number. thus, I tried the following array formula (which I am pretty sure is not right): =IF((MONTH(A14)={1,3,5,7,8,10,12}); 31; IF((MONTH(A14)={4,6,9,11}); 30; IF((MONTH(A14)=2); 28; "Error"))) but it always gives me the only result: "ERROR". Your help will be much appreciated. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Cheers mate
"Bob Phillips" wrote: Try this =DAY(DATE(YEAR(A14);MONTH(A14)+1;0)) -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "catrrmg" wrote in message ... Hi all I've got to find the number of days in a month based on a date's month number. thus, I tried the following array formula (which I am pretty sure is not right): =IF((MONTH(A14)={1,3,5,7,8,10,12}); 31; IF((MONTH(A14)={4,6,9,11}); 30; IF((MONTH(A14)=2); 28; "Error"))) but it always gives me the only result: "ERROR". Your help will be much appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Finding the number of Days in the month? | Excel Discussion (Misc queries) | |||
Number of Days in the Month | Excel Discussion (Misc queries) | |||
Need help to reflect number of days in a month. | Excel Worksheet Functions | |||
number of days in a month | Excel Worksheet Functions | |||
Count number of days in given month? | Excel Worksheet Functions |