View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Pete McCosh[_5_] Pete McCosh[_5_] is offline
external usenet poster
 
Posts: 59
Default Calulating the last sayurday of a week using vba

Assume the date you're using as the start point is stored
in variable x, then:

y = x - (weekday(x) + 1)

will give you last Saturday's date in y, assuming you
haven't changed the FirstDayofWeek constant from Sunday.

Cheers, Pete

-----Original Message-----
I am trying to write a formula, using vba to give me the

date of the last
saturday from 'Today's date'. For example, if today is

Monday, what is the
date of last saturday....

Any ideas?


.