View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default Calculating Patch Tuesday

Thanks for the feedback


--


Regards,


Peo Sjoblom


"PM" wrote in message
...
That's perfect Peo, thanks!

"Peo Sjoblom" wrote in message
...
This will return the second Tuesday of the same month as today's date


=DATE(YEAR(TODAY()),MONTH(TODAY()),1)+14-WEEKDAY(DATE(YEAR(TODAY()),MONTH(TO
DAY()),1)+4)


so you can compare to see if today is greater than or equal to the 2nd
Tuesday


=IF(TODAY()=DATE(YEAR(TODAY()),MONTH(TODAY()),1)+ 14-WEEKDAY(DATE(YEAR(TODAY
()),MONTH(TODAY()),1)+4),DATE(YEAR(TODAY()),MONTH( TODAY()),1)+14-WEEKDAY(DAT
E(YEAR(TODAY()),MONTH(TODAY()),1)+4),DATE(YEAR(TOD AY()),MONTH(TODAY())-1,1)+
14-WEEKDAY(DATE(YEAR(TODAY()),MONTH(TODAY())-1,1)+4))


that will give you 11/13/07 for today's date and 10/09/07 if today was
one
week ago

so if you put this formula in B1 and you want the previous month's 2nd
Tuesday in B2 then use


=DATE(YEAR(B1),MONTH(B1)-1,1)+14-WEEKDAY(DATE(YEAR(B1),MONTH(B1)-1,1)+4)


copy down the last formula one row and you will get the previous month's

2nd
Tuesday