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

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
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,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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