View Single Post
  #2   Report Post  
Jonathan Cooper
 
Posts: n/a
Default

F3=DATE(YEAR(P1),MONTH(P1),1)+(7-WEEKDAY(DATE(YEAR(P1),MONTH(P1),1),2))
F4=F3+7
F5=F4+7
F6=F5+7
F7=F6+7

Depending on the number of weeks, the formula in F7 may result in a November
date. That can be fixed as well.

"mikeburg" wrote:


Need cell formula or UDF that will return the 1st, 2nd, 3rd, 4th, or 5th
Sunday's dates in cells when the month end date is given in a cell. For
example:

In cell P1, a date of 10/31/05 is entered. I need the following dates:

In cell F3 10/02/05 (the 1st Sunday in October)
In cell H3 10/09/05 (the 2nd Sunday in October)
In cell J3 10/16/05 (the 3rd Sunday in October)
In cell L3 10/23/05 (the 4th Sunday in October)
In cell N3 10/30/05 (the 5th Sunday in October)

Any formula suggestions would be greatly appreciated. Mikeburg


--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=471744