dates of month
With 12/1 entered into cell A1, use
=DATE(YEAR(A1),MONTH(A1),1)+CHOOSE(WEEKDAY(DATE(YE AR(A1),MONTH(A1),1)),0,6,5,4,3,2,1)
for the first Sunday, then for the next Sundays, use
=DATE(YEAR(A1),MONTH(A1),1)+CHOOSE(WEEKDAY(DATE(YE AR(A1),MONTH(A1),1)),0,6,5,4,3,2,1) + 7
=DATE(YEAR(A1),MONTH(A1),1)+CHOOSE(WEEKDAY(DATE(YE AR(A1),MONTH(A1),1)),0,6,5,4,3,2,1) + 14
=DATE(YEAR(A1),MONTH(A1),1)+CHOOSE(WEEKDAY(DATE(YE AR(A1),MONTH(A1),1)),0,6,5,4,3,2,1) + 21
and if there is a fifth Sunday:
==IF(MONTH(DATE(YEAR(A1),MONTH(A1),1)+CHOOSE(WEEKD AY(DATE(YEAR(A1),MONTH(A1),1)),0,6,5,4,3,2,1) + 28
)=MONTH(A1),DATE(YEAR(A1),MONTH(A1),1)+CHOOSE(WEEK DAY(DATE(YEAR(A1),MONTH(A1),1)),0,6,5,4,3,2,1) +
28,"")
HTH,
Bernie
MS Excel MVP
"rejoyce40" wrote in message
...
I have a date [i.e. 12/1/2008] that is entered in a cell, then I want all the
Sunday dates of that month to automatically enter in non-adjacent cells on
the form.
I've searched and cannot get this to work - help would be appreciated!!
thanks!
|