Check for overlapping dates by userID

nathangwynmorris

New Member
Joined
Feb 23, 2022
Messages
11
Office Version
  1. 365
Platform
  1. MacOS
Hi All,

Been scratching my head on this for a while... I have a spreadsheet with the following:-

Column A = UserID [this varies on the number of entries based on the number of requests]
Column B = StartDate
Column C = EndDate

What I am trying to do is group up on the userID and then check column B and C to see if any of the dates above or below for that user overlap? So ideally in D2 would be my first formula. Ideally the data doesn't need to be sorted by ID or start date. And perhaps I could just have a simple overlap when the dates overlap and OK if there is no overlap

Any help would be amazing!!

Nathan
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi All,

Been scratching my head on this for a while... I have a spreadsheet with the following:-

Column A = UserID [this varies on the number of entries based on the number of requests]
Column B = StartDate
Column C = EndDate

What I am trying to do is group up on the userID and then check column B and C to see if any of the dates above or below for that user overlap? So ideally in D2 would be my first formula. Ideally the data doesn't need to be sorted by ID or start date. And perhaps I could just have a simple overlap when the dates overlap and OK if there is no overlap

Any help would be amazing!!

Nathan
Try this table based solution.

Formula in range D2:D7 :

=IF(SUMPRODUCT(([@StartDate]<FILTER([EndDate],[UserID]=[@UserID]))*([@EndDate]>FILTER([StartDate],[UserID]=[@UserID])))>1,"Overlap","OK")

I could not get XL2BB to work.

1692040300973.png
 
Upvote 0
As the OP is using 2013 he/she doesn't have the Filter function.
 
Upvote 0
Hey @Fluff, that's correct - thanks for trying though @Herakles. The only other thing I can do is use Google Sheets if the filter function is available there? I tried the above formula and it doesn't seem to work but maybe needs to be tweaked. I have checked the forum too - and nothing is shouting out at me as an obvious answer :(
 
Upvote 0

Forum statistics

Threads
1,215,083
Messages
6,123,020
Members
449,092
Latest member
ikke

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