Find the number of days in a month

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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)
 
Cheers mate

Bob Phillips said:
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top