Hi all, here is what I am trying to do:
Please look at the image provided. I want to write a formula where in columns R through AA there is an output of "7" (days) that populates IF the dates in AB and AC are contained in that week.
So, for example in the first row of data, in week 10/25/11 for the dates of 7/3/11 through 12/31/11, I would need the cell to populate with a "7" since the week of 10/25 (10/25 -10/31) does fall within the 7/3/11 through 12/31/11 range. If it does NOT fall within the range, then I would want to know how many days were cut off in that week. For example, if the range of dates provided was 7/3/11 through 10/29/11 then the output would be "2" since it is cut off 2 days short of 10/31.
I am fairly certain this can all be done with a formula, I just can't get my head around the logic.
Hopefully this makes sense.
Please look at the image provided. I want to write a formula where in columns R through AA there is an output of "7" (days) that populates IF the dates in AB and AC are contained in that week.
So, for example in the first row of data, in week 10/25/11 for the dates of 7/3/11 through 12/31/11, I would need the cell to populate with a "7" since the week of 10/25 (10/25 -10/31) does fall within the 7/3/11 through 12/31/11 range. If it does NOT fall within the range, then I would want to know how many days were cut off in that week. For example, if the range of dates provided was 7/3/11 through 10/29/11 then the output would be "2" since it is cut off 2 days short of 10/31.
I am fairly certain this can all be done with a formula, I just can't get my head around the logic.
Hopefully this makes sense.