Maximum date in a Month

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Is there a way, using a macro to calculate the last date for a month when the
fist day of the month is input?
examples:
Input 10/1/2008
Result 10/31/2008

Input 8/1/2008
Result 8/31/2008

Thanks
Steve
 
Assuming your input date is in cell A1, try this formula:


=DATE(YEAR(A1),MONTH(A1)+1,0)

tom
 
If you have the Analysis ToolPak add-in installed (Excel versions prior to
Excel 2007):

A1 = some date

=EOMONTH(A1,0)
 
Works fine. Thanks guys
Steve

T. Valko said:
If you have the Analysis ToolPak add-in installed (Excel versions prior to
Excel 2007):

A1 = some date

=EOMONTH(A1,0)
 
Back
Top