Does anyone have a formula to figure out which month a week of a year belongs to? For example, this current week (week of June 22nd, 2014; for this application weeks start on Sunday) is week 26 of the year. It is a week in June of course.
The complicated part is weeks where the month changes over mid-week. I would like it so that a week is considered a part of the month that it has more days in- for example, next week (The week starting on Sunday, June 29th) would be considered a week in July because it has 5 days in July vs. only 2 in June.
Is this possible?
Here are the details of my project if needed-
There are a bunch of workbooks titled "Week __", where the blank is the number of the week of the year. These workbooks have weekly summary data in them, and I would like to create a monthly workbook that pulls the data from these weekly workbooks. I would like the calculations to happen automatically upon opening this monthly workbook, and I need a way to figure out which weeks are a part of a certain month so that I can reference the correct data. I know this will involve visual basic code but I'm struggling with the formula/calculation itself.
The complicated part is weeks where the month changes over mid-week. I would like it so that a week is considered a part of the month that it has more days in- for example, next week (The week starting on Sunday, June 29th) would be considered a week in July because it has 5 days in July vs. only 2 in June.
Is this possible?
Here are the details of my project if needed-
There are a bunch of workbooks titled "Week __", where the blank is the number of the week of the year. These workbooks have weekly summary data in them, and I would like to create a monthly workbook that pulls the data from these weekly workbooks. I would like the calculations to happen automatically upon opening this monthly workbook, and I need a way to figure out which weeks are a part of a certain month so that I can reference the correct data. I know this will involve visual basic code but I'm struggling with the formula/calculation itself.