Calculating Patch Tuesday
On Thu, 15 Nov 2007 15:09:15 -0000, "PM" wrote:
Hi,
I need three formulae that use the current date to give the dates of the
last three 'Patch Tuesdays', i.e. the second Tuesday of the month.
So for today (15th Nov) the relevant dates are 13th Nov, 9th Oct, 11th Sep,
but a week ago the results would have been 9th Oct, 11th Sep, 14th Aug.
Anyone?
TIA
Pete
Here's another way. The hard part is figuring out whether the most recent
"last" Patch Tuesday should be in this month or the previous month. So,
assuming your initial date is in A1:
Most recent "last Patch Tuesday"
B1:
=IF(DAY(A1-DAY(A1)+18-WEEKDAY(A1-DAY(A1)+15))<DAY(A1),
A1-DAY(A1)+18-WEEKDAY(A1-DAY(A1)+15),A1-DAY(A1)+18-WEEKDAY(
A1-DAY(A1)+15)-28-7*((DAY(A1-DAY(A1)+18-WEEKDAY(A1-DAY(A1)+15)-28)14)))
B2: Patch Tuesday previous to that in B1:
=B1-28-7*((DAY(B1-28)14))
Then fill down B2 as far as you need.
--ron
|