View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
LGG
 
Posts: n/a
Default Calculate Days in a Month

Thanks Biff! This was really helpful. It works!!! You saved my work.
LGG

"Biff" wrote:

Hi!

if February is chosen on A1, then 28 (days) would appear


What about leap years when Feb has 29 days?

One way:

In some location list the months:

J1 = January
J2 = February
J3 = March
...
J12 = December

=DAY(DATE(YEAR(TODAY()),MATCH(A1,J1:J12,0)+1,0))

Biff

"LGG" wrote in message
...
Hi. I need help finding a formula to calculate the number of days in a
month
depending on the month you choose from a drop down menu.
Example:

In cell A1 user will be ask to select a month from a drop down menu.
In cell B1 I want the number of days in the month corresponding to the
month
selected in A1. So, if February is chosen on A1, then 28 (days) would
appear
on B1.

I was trying to do if statements, but I keep getting an error. Is there an
easy way to do this?

Thanks
LGG