View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Grey Old Man[_2_] Grey Old Man[_2_] is offline
external usenet poster
 
Posts: 24
Default Current year and current week number

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.