If A1 has a DAY(A1)<15, then DAY(A1+6)/7 < 3, so not third Friday.
If A1 has a DAY(A1)21, then DAY(A1+6)/7 3, so not third Friday.
So only dates between the 15th and the 21st will give a TRUE result.
=--AND(WEEKDAY(A1)=6,INT(DAY(A1+6)/7)=3)
you are right, this (esp. the "--" part) is a lot easier to understand
and reproduce than
is the third friday not the only friday between 15th and 21st?
=IF(AND(DAY(a1)=15,day(a1)<=21,weekday(a1)=6),1, 0)
LOL
arno
|