Thread: Macro needed
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Macro needed

Try this:

Sub lastDOW()
dif = "6" - Format(Date, "w")
lstDOW = Format(Now + dif, "d mmm yyyy")
ActiveSheet.Range("A1") = CDate(lstDOW)
End Sub

It posts the date in A1 in the sytem format as data type Date. You can
either format the cell to change it or modify the code.




"david24" wrote:

I need a macro that will auto enter the week ending date into a cell. anyone
help?