Finding date range overlaps between rows based on matching ID value

ub3rmario

New Member
Joined
Jun 6, 2016
Messages
3
Hi Folks,

Firstly here is a sample of the data:

Account IDStart DateEnd Date
0015000000T25KYAAZ

<tbody>
</tbody>
10/1/2015

<tbody>
</tbody>
10/14/2015

<tbody>
</tbody>
0015000000NJ0e2AAD

<tbody>
</tbody>
10/1/2015

<tbody>
</tbody>
10/15/2015

<tbody>
</tbody>
0015000000Li6AmAAJ

<tbody>
</tbody>
10/1/2015

<tbody>
</tbody>
1/18/2016

<tbody>
</tbody>
0015000000KPgMOAA1

<tbody>
</tbody>
10/1/2015

<tbody>
</tbody>
10/15/2015

<tbody>
</tbody>
0015000000KPgJJAA1

<tbody>
</tbody>
10/1/2015

<tbody>
</tbody>
10/14/2015

<tbody>
</tbody>
0015000000T25KYAAZ

<tbody>
</tbody>
10/1/2015

<tbody>
</tbody>
9/30/2016

<tbody>
</tbody>
0015000000NJ0e2AAD

<tbody>
</tbody>
10/16/2015

<tbody>
</tbody>
9/30/2016

<tbody>
</tbody>
0015000000Li6AmAAJ

<tbody>
</tbody>
1/19/2016

<tbody>
</tbody>
9/30/2016

<tbody>
</tbody>
0015000000KPgMOAA1

<tbody>
</tbody>
10/16/2015

<tbody>
</tbody>
9/30/2016

<tbody>
</tbody>

<tbody>
</tbody>

What I'm trying to do is write an error checking formula to tell me if any records with the same account ID have overlapping date ranges. Ideally the formula would also list the rows where this occurs but I'd also be fine with a separate column that indicates "overlap" or "good" - something like that.

I can't for the life of me figure out the best way to do this. I tried using nested IF formulas to see if the account IDs are equal then to see if the end date of each row is greater than the start date of other rows who match the ID. This keeps giving me an error though and I think it's because I have a misunderstanding of array formulas.

I highlighted an example of something I want to catch, in red.

If possible I'd like just one cell that says "ERRORS" if it finds any overlapping dates for the same accounts, OR i'd be fine with a whole separate column that would have a formula you pull down until the last row. Either way is fine.

If anyone has any suggestions I'd be eternally grateful! Thanks.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,213,567
Messages
6,114,342
Members
448,570
Latest member
rik81h

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