View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default check if is last day of month then, else

Try this:

If Date = dateserial(year(date),Month(date)+1,0) then
'do something
Else
'do something else
End If


Is that something you can work with?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"pswanie" wrote in message
...
i got a macro to copy and special paste data in order to get a accumalative
sales data. i want to add to it so that it check if today is the last day
of
the month.

something like

if now() = lastday of month then
run macro
else
range a1.value = ""
end if


thanx
Phillip