View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Filling in a cell based on another cells date criteria

I must admit to being confused between F5, C20 and which date of the first,
but ...

=IF(WEEKDAY(DATE(YEAR(F5),MONTH(F5),1),2)<6,C20,
DATE(YEAR(F5),MONTH(F5),1)+CHOOSE(WEEKDAY(DATE(YEA R(F5),MONTH(F5),1)),1,0,0,0,0,0,2))

--
__________________________________
HTH

Bob

"cmatera" wrote in message
...
I want to populate a cell with the value of another
cell..based on the following date criteria - My date cell is stored in
(F5) and the cell I want to populate (D20) has a value stored in (C20)

If the first of the month is a Mon-FRI then the cell (D20) gets
populated on
the date in the week which the first of the month falls on...example:
if 8/1/08 were a wed the field (D20) would get populated with the
value in cell (C20)

UNLESS

If the first of the month were a Sat..like 11/1/08... if the first of
the month falls on a saturday
on a sat...then the field (D20) would get populated with (C20's) value
on the following monday
(11/3/08)

This is a really pesky problem - but any help is appreciated
Thanks