weird date issue

J

Jon Tillman

I have a worksheet that holds daily sales data for the last 5 years,
by day. I am trying to aggregate that data into a new worksheet by
week. sheet 2 is organized by week number. I have a week number
assigned to each row in the first worsheet. What I want to do is to
grab the start and end dates from sheet one based on the week number
in sheet two. Any ideas?
 
T

Tom Ogilvy

Are week numbers sequential across the 5 years or do they start over each
year

assume sequential (1 to 5*52)

Assume dates in column A and weeknumber in Column B. Assume dates sorted
chronologically.

so to get first day for week 137

=index(sheet1!A:A,Match(137,Sheet1!B:B,0),1)

should get you the first date

=index(sheet1!A:A,Match(137,Sheet1!B:B,0),1)+7

should get the last date of the week.
 
Top