To find range of dates overlapping for maximum input date ranges

Rajan

New member
Joined
Jan 20, 2017
Messages
2
Reaction score
0
Points
0
Hello All,

I am trying to find a common range of dates from several date ranges. I have tried to explain the problem with below two scenarios
Capture1.PNG

Capture2.PNG

Thanks in advance :)

--
Regards,
Rajan
 
The maximum number of days for difference two dates

I am trying to find a common range of dates from several date ranges.
If you can do to add to the beginning (or someplace else) additional column in cell A2 put formula (copy down)
Code:
=D3-C3
In cell M2 put the formula (copy across to N2)
Code:
=INDEX(C3:C7;MATCH(MAX(A3:A7);A3:A7;0);1)
In the Conditional Formatting put the formula for a cell range E3:K7
Code:
=AND(E$2>=$C3;E$2<=$D3)
 

Attachments

  • rajan-navic7257-image.png
    rajan-navic7257-image.png
    15.1 KB · Views: 9
Hello navic

Thanks for your reply. I guess my question was not that clear, let me put it once again.
Requirement is:
Example Case1) To find range of dates, that have maximum overlap.
>> There are two date ranges that satisfy overlap condition, dates "15-Apr to 31-May" & "1-Aug to 2-Aug" have maximum overlapping i.e. 4 each
>> In case there are more than one range with max overlapping period, than overlapping period with max duration should be the ans.
>> Like in this Case 1, Answer should be "15-Apr to 31-May"
Capture1.PNG

Example Case2) To find range of dates, that have maximum overlap.
>> There is only one range that satisfy overlap condition, dates "1-Aug to 2-Aug" i.e. 5
>> Like in this Case 2, Answer should be "1-Aug to 2-Aug"
Capture2.PNG

Hope i have added some more clarity to the problem statement. :)

--
Rajan
 
Perhaps can help to you this attached example
 

Attachments

  • rajan-navic7257.xlsx
    36.4 KB · Views: 9
Back
Top