On Wed, 31 Aug 2005 21:35:50 -0500, noiseash
wrote:
I have problem with writing the formula that copy the content of one
sheet to another first Friday every month, some second Friday every
month, third, fourth....etc.
What I want is, eg, in cell "A1" of sheet2
if (today=first Friday, sheet1!A1,"")
i don't know how to let the system judge if today is a first Friday of
this month or not. I write a formula like this:
if(weekday(today())=5,sheet1!A1,"")
But this only works for every Friday, not for First/Second...Fridays
Any help will be appreciated. Thank you!
The formula to determine the first Friday of a month, with some date in that
month in A1, is:
=A1-DAY(A1)+8-WEEKDAY(A1-DAY(A1)+2)
So for your formula:
=IF(TODAY()=TODAY()-DAY(TODAY())+8-WEEKDAY(TODAY()-DAY(TODAY())+2),SHEET1!A1,"")
or, you could do it this way:
=IF(AND(DAY(TODAY())<=7,WEEKDAY(TODAY())=6),Sheet1 !A1,"")
--ron
|