ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   weird date issue (https://www.excelbanter.com/excel-programming/301881-weird-date-issue.html)

Jon Tillman

weird date issue
 
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?

Tom Ogilvy

weird date issue
 
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.

--
Regards,
Tom Ogilvy

"Jon Tillman" wrote in message
...
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?





All times are GMT +1. The time now is 10:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com