I would like to take this opportunity to introduce you to Chip Pearson's page
regarding WEEKNUM.
After reading - try both formulas:
=TRUNC(((TODAY()-DATE(YEAR(TODAY()),1,0))+6)/7)
=WEEKNUM(TODAY())
and see for yourself...
http://www.cpearson.com/excel/WeekNumbers.aspx
Micky
"Grey Old Man" wrote:
I can obtain the current year with YEAR(TODAY()) and the current week number
with WEEKNUM, but I want to display the results in an ?array. By this I mean;
row 1 contains the week nos 1 -52; column A contains the years 2010,2009,2008.
I want the result to look like:
2010 N N N -----N until week 52
2009 Y Y Y ------ Y until current week, then N N N until week 52
2008 Y Y Y ------ Y until week 52
My current attempt fails, which is
=IF(AND(Current_Year=$A2,Current_Week=$B$1),"Y", "N")
The purpose is to automatically populate a chart (graph) with current data
(Y) and ignore future data (N). Thanks in anticipation.