Formula needs for duplicate values with overlapping date ranges

sabrinamb

New Member
Joined
May 6, 2014
Messages
3
Hi,

I currently have a list of colleagues who have hired cars. I have their collegaue numbers in column A. I then have the start date of the car hire in column B and the end date of the car hire in column C. I need to highlight colleagues who have had more then 1 car hire within the same date range. So in effect i need the formula to first find duplicates in column A and then compare the dates to see whether any overlap and highlight those that do in a colour, so that i can investigate these.

I've tried to use conditional formatting but i dont know how to include the date range comparison into this.

Any help would be much appreciated.

Thanks
Sabrina

Example: 745CVB and 852TGB should be highlighted as they have overlapping dates

Col A Col B Col C
745CVB 01/04/2010 02/08/2010
745CVB 03/08/2010 15/09/2013
745CVB 07/05/2013 06/05/2014
985MNB 02/06/2011 25/05/2013
985MNB 27/05/2013 06/05/2014
852TGB 05/02/2012 12/12/2013
852TGB 01/12/2013 01/01/2014
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
2 questions.

Does your database sorted by column A?
Are you need to highlight only rows which are overlapping or all rows for this colleague?</SPAN>
 
Upvote 0
Thank you for your reply.

Yes can sort by column A and yes it would need to highlight all rows for the colleague
 
Upvote 0
try this


Excel 2010
ABCDE
1NumberStartEnd
2745CVB01/04/201002/08/2010 Highlight
3745CVB03/08/201015/09/2013OverlappingHighlight
4745CVB07/05/201306/05/2014OverlappingHighlight
5985MNB02/06/201125/05/2013
6985MNB27/05/201306/05/2014
7852TGB05/02/201212/12/2013OverlappingHighlight
8852TGB01/12/201301/01/2014OverlappingHighlight
Sheet1
Cell Formulas
RangeFormula
D2=IF(SUMPRODUCT(--($A$2:$A$8=A2)*--($B$2:$B$8)*--($C$2:$C$8>B2))>1,"Overlapping","")
E2=IF(COUNTIFS(A2:A8,A2,D2:D8,"Overlapping")>=1,"Highlight","")
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,595
Members
449,089
Latest member
Motoracer88

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