View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
pinmaster pinmaster is offline
external usenet poster
 
Posts: 347
Default formula for last day of month with a twist

Hi,

Try this:

=IF(A1=EOMONTH(A1,0),EOMONTH(A1,1),EOMONTH(A1,0))

Regards!
Jean-Guy

"MelB" wrote:

I need a formula that calculates the last day of the month, but if the date
falls on the last day of the month I need it to return the last day of the
next month.

If A1=5/1/07, i need 5/31/07
If A1=5/31/07, i need 6/30/07

Many thanks.