Thread: End Of Month
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Fredrik Wahlgren Fredrik Wahlgren is offline
external usenet poster
 
Posts: 339
Default End Of Month


"Pete" wrote in message
...
How can I detect if the End Of the month has been reached
from within VBA

I know you can use EOMONTH in Excel, is it available in
VBA?

Pete


Assuming you have a date in A1, you could use this formula

=IF(A1=DATE(YEAR(A1),1+MONTH(A1),0), TRUE, FALSE)

I got the idea from http://www.mrexcel.com/td0053.html

/Fredrik