Date Functions
I am trying to determine the date in which the 1 and 3 tuesday of the month
falls...is this possible? Thanks for your help. -- Jules |
Date Functions
|
Date Functions
On Wed, 5 Jul 2006 05:25:02 -0700, Jules
wrote: I am trying to determine the date in which the 1 and 3 tuesday of the month falls...is this possible? Thanks for your help. In general, the first n-day of a month can be determined by: =A1-DAY(A1)+8-WEEKDAY(A1-DAY(A1)+1-DOW) where A1 = any date during that month and where DOW = Day of Week (Sun=1, Mon=2, Tues=3) The third n-day is the above +14. So for the first Tuesday: =A1-DAY(A1)+8-WEEKDAY(A1-DAY(A1)-2) Third Tuesday =A1-DAY(A1)+22-WEEKDAY(A1-DAY(A1)-2) If A1 is always the first day of the month, then: First Tuesday: =A1+7-WEEKDAY(A1-3) Third Tuesday: =A1+21-WEEKDAY(A1-3) --ron |
Date Functions
Thank you so much!
-- Jules "Ron Rosenfeld" wrote: On Wed, 5 Jul 2006 05:25:02 -0700, Jules wrote: I am trying to determine the date in which the 1 and 3 tuesday of the month falls...is this possible? Thanks for your help. In general, the first n-day of a month can be determined by: =A1-DAY(A1)+8-WEEKDAY(A1-DAY(A1)+1-DOW) where A1 = any date during that month and where DOW = Day of Week (Sun=1, Mon=2, Tues=3) The third n-day is the above +14. So for the first Tuesday: =A1-DAY(A1)+8-WEEKDAY(A1-DAY(A1)-2) Third Tuesday =A1-DAY(A1)+22-WEEKDAY(A1-DAY(A1)-2) If A1 is always the first day of the month, then: First Tuesday: =A1+7-WEEKDAY(A1-3) Third Tuesday: =A1+21-WEEKDAY(A1-3) --ron |
Date Functions
On Wed, 5 Jul 2006 08:06:01 -0700, Jules
wrote: Thank you so much! -- Jules You're welcome. Glad to help. --ron |
All times are GMT +1. The time now is 09:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com