Help finding the date of the last Saturday of a given month
If you want something really long, try this:
=IF(WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0)-(MAX(0,WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0),2)-5)))<7,DATE(YEAR(A1),MONTH(A1)+1,0)-(MAX(0,WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0),2)-5))-WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0)-(MAX(0,WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0),2)-5))),DATE(YEAR(A1),MONTH(A1)+1,0)-(MAX(0,WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0),2)-5)))
The date you want the last Saturday of the month is in A1.
"Chuck M" wrote in message
...
Hi,
I can't get my head around the calculation necessary to find the date of
the
last Saturday in any given month. Any help will be greatly appreciated!
--
Thanks.
Chuck M.
|