I have a number of records in a sheet, each with a start and end date. Each line has a record number, with some lines having record numbers the same as other lines (The sheet lists cases and dates that case was used. Some cases have 1 line only, while others will have several lines)
The dates for each case will not overlap, however there may be gaps between each range
For example:
Case# -- Start Date -- End Date
Case 1 - 01/01/2018 - 05/01/2018
Case 1 - 06/01/2018 - 13/01/2018
Case 1 - 17/03/2018 - 20/03/2018
Case 2 - 14/02/2018 - 15/02/2018
Case 3 - 19/05/2018 - 25/05/2018
Case 3 - 26/05/2018 - 28/05/2018
I need to know how many weeks these date ranges cover. So for Case 1, it would be 4 weeks (the start date of the second line is still within the same week as the first line, so no need to count the week number twice, the third line actually occurs over 2 different weeks, so would be counted as 2 weeks)
I can get the week number for the dates (Using ISOWEEKNUM) but I need a formula that would look at all lines for that case#, and to not include the weeks in the gaps. If I use the earliest date and then the lastest date for Case 1, the number of weeks would be 12...
If anyone can assist I would be most appreciative, I haven't been able to find anything in my searches
TIA Cheers, Nat