View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Thomas Dave Thomas is offline
external usenet poster
 
Posts: 146
Default formulas populating dates - 1st Tuesday

Here are two formulas that accomplish what you want. They are general
purpose and are easy to change to other days and other occurrences. In A1
you put any date in the year. The only important part of this date is the
year. In A2 you put the day of the week you want with 1 = Sunday, 2 = Monday
...... 6 = Saturday. In A3 you put the occurrence of the day in the month
with 1 = first, 2 = second .... 5 = fifth. The only thing you must be
careful of is to ensure the occurrence number is valid. For example, the
only way there can be 5 occurrences of any day of the week in February is
when February is a leap year.

You enter the formulas in the cell of your choosing, format the result and
drag the formula across 11 more columns in the case of the column formula or
down 11 more rows in the case of the row formula.

The column formula:

=DATE(YEAR($A1),COLUMN(A1),1)+$A2-WEEKDAY(DATE(YEAR($A1),COLUMN(A1),1))+($A3-($A2=WEEKDAY(DATE(YEAR($A1),COLUMN(A1),1))))*7

The row formula:

=DATE(YEAR(A$1),ROW(A1),1)+A$2-WEEKDAY(DATE(YEAR(A$1),ROW(A1),1))+(A$3-(A$2=WEEKDAY(DATE(YEAR(A$1),ROW(A1),1))))*7

`"Jessica" wrote in message
...
I have a start date that varies - and I need a formula that populates the
first Tuesday each month. I have tried several different formulas but they
all get messy due to some months being 4 weeks and others 5 weeks. Any
suggestions on which formula to try? Thanks so much!

A1= 1/6/07

Each month needs to be the first Tuesday of the month.