View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default VBA - Work out How Many Days are in a Month

With a date in a1 try

=DAY(DATE(YEAR(A1),MONTH(A1)+1,1)-1)

Mike

"NateBuckley" wrote:

Just wondering if anyone has any idea how to find out how many days are in a
given month from a given year?

So If I were to put the month as APRIL 2008 I'd get back 30.

Thanks in advance!