View Single Post
  #40   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default Formula to Return the next 1st Tuesday of a Month

Sean wrote...
Guys a twist on my OP, how could I return a similar value, but this
time the "last" Thursday of each month?


Last Thursday of the month for the date in cell A3 is given by

=A3-WEEKDAY(A3-4,2)+7*(MATCH(TRUE,DAY(A3-WEEKDAY(A3-4,2)
+7*{2;3;4;5;6})<8,0))

Make similar adjustments as in my previous response to use noon as the
cutoff time on that day.

Note: A3-WEEKDAY(A3-n,2) is the previous n_th day of the week before
the date in cell A3, where n_th is in the same sense as WEEKDAY(.,2),
i.e., 1=Monday, 2=Tuesday, etc. Then note that there are at most 5 of
any given weekday in any given month.