Matching Multiple date ranges with other date ranges

jabaker54

New Member
Joined
Sep 24, 2014
Messages
11
I have a data set where I am trying to get excel to recognize when two data sets overlap one another. In both tables I have an Activity, a name, end date and start date. If two date ranges from the two tables overlap, and the names of the two people match, I want that row to highlight. The tables are below

ActivityNameStart End
1John12-Oct-2014 18-Oct-2014
2Bill12-Nov-201418-Nov-2014
3Sally12-Dec-201418-Dec-2014
4Paul12-Jan-201518-Jan-2015
5Christy12-Feb-201518-Feb-2015
6Tim12-Mar-201518-Mar-2015
7Frank12-Apr-201518-Apr-2015
ActivityNameStartEnd
1Paul30-Jan-201531-Jan-2015
2Frank10-Apr-201513-Apr-2015
3Tim20-Mar-201521-Mar-2015
4John8-Oct-201410-Oct-2014
5Christy12-Feb-201512-Feb-2015
6Sally11-Dec-201412-Dec-2014
7Bill20-Nov-201425-Nov-2014

<tbody>
</tbody>
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Pasting you data into excel as seen here your second table is in A11:D18. So click A12, press conditional formatting, new rule, use formula to determine.., in the box place this:

=VLOOKUP($B12,$B$2:$D$8,3,0)>$C12

Format to however required then press OK.

In the resultant applies to box place this:

=$A$12:$D$18

Press OK.
 
Upvote 0
It looks for the value of B12 in B2:B8 and returns the value in the same row but the 3rd column to the right INCLUDING the original column. So 3rd is D (B,C,D). The 0 means it needs to find an exact match of B12 in B2:B8. This lookup is looking for the end date in first table then seeing if it is greater (later) than the start date in 2nd table.
 
Upvote 0

Forum statistics

Threads
1,215,039
Messages
6,122,799
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top