SOLVED

Check for overlap of Date and Time Formula

%3CLINGO-SUB%20id%3D%22lingo-sub-1747781%22%20slang%3D%22en-US%22%3ECheck%20for%20overlap%20of%20Date%20and%20Time%20Formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1747781%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20find%20a%20formula%20to%20check%20overlap%20of%20Date%20and%20time%20in%20excel%20.%20I%20have%20a%202%20worksheets%20each%20have%20columns%20of%26nbsp%3B%20start%20and%20Finish%20Date%20and%20Time%20Combined%20.%20I%20want%20to%20review%20each%20row%26nbsp%3B%20and%20give%20a%20yes%20if%20overlaps%20with%20a%20start%20or%20finish%20event%20in%20sheet%202%20or%20no%20if%20I%20doesn't%20.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1747781%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1748447%22%20slang%3D%22en-US%22%3ERe%3A%20Check%20for%20overlap%20of%20Date%20and%20Time%20Formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1748447%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F821242%22%20target%3D%22_blank%22%3E%40glen302%3C%2FA%3E%26nbsp%3BPlease%20have%20look%20at%20the%20attached%20workbook.%20I%20sorted%20the%20dat%2Ftime%20entries%20in%20sheet1%20in%20ascending%20order.%20In%20sheet%202%20I%20sorted%20the%20date%2Ftime%20entries%20in%20descending%20order.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20on%20sheet1%2C%20I%20used%20XLOOKUP%20and%20INDEX%2FMATCH%20to%20find%2C%20for%20each%20start%20time%20the%20next%20largest%20starting%20time%20in%20sheet2%20and%20compered%20it%20the%20ending%20time%20in%20sheet1.%20If%20it%20is%20less%2C%20then%20there%20is%20an%20overlap%20(TRUE)%20otherwise%20not%20(FALSE).%20If%20I%20have%20misunderstood%2C%20please%20give%20a%20few%20examples%20of%20entries%20that%20you%20consider%20to%20be%20overlapping%20and%20explain%20how%20you%20come%20to%20that%20conclusion.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%20that%20the%20ending%20dates%2Ftimes%20in%20sheet1%20were%20texts%2C%20so%20I%20converted%20them%20to%20real%20dates%20first%20using%20Text.to-columns.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1751884%22%20slang%3D%22en-US%22%3ERe%3A%20Check%20for%20overlap%20of%20Date%20and%20Time%20Formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1751884%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%20Thanks%20so%20much%20for%20your%20help%20%2C%20I%20would%20never%20have%20worked%20this%20out%20.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20certainly%20shows%20if%20there%20was%20an%20overlap%2C%26nbsp%3B%20I%20would%20also%20like%20it%20to%20say%20true%20if%20is%20within%20a%20start%20and%20finish%20date%20and%26nbsp%3B%20time%26nbsp%3B%20event%20in%20sheet%202%26nbsp%3B%20is%20there%20a%20way%20i%20can%20add%20this%20to%20formula%20or%20add%20a%20column%20start%20a%20separate%20formula%20%3F%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%3CP%3EI%20suppose%20what%20I'm%20asking%20is%20does%20an%20event%20in%20Sheet%201%20occur%26nbsp%3B%20in%20or%20overlap%20with%26nbsp%3B%20the%20date%20and%20time%20event%26nbsp%3B%20on%20sheet%202%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1752208%22%20slang%3D%22en-US%22%3ERe%3A%20Check%20for%20overlap%20of%20Date%20and%20Time%20Formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1752208%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F821242%22%20target%3D%22_blank%22%3E%40glen302%3C%2FA%3E%26nbsp%3BI%20believe%20that%20is%20what%20my%20suggestion%20did.%20Show%20events%20from%20sheet1%20that%20overlap%20events%20in%20sheet2.%20So%2C%20not%20sure%20what%20you%20mean%20by%20your%20last%20question.%20Can%20you%20find%20a%20type%20of%20overlap%20that%20doesn't%20not%20get%20picked-up%20by%20my%20formula%20and%20describe%20the%20logic%20of%20it.%20In%20other%20words%2C%20what%20steps%20did%20you%20go%20through%20in%20your%20mind%20to%20determine%20that%20this%20particular%20event%20is%20overlapping%20another.%20Then%2C%20a%20formula%20will%20not%20be%20all%20that%20difficult%2C%20I%20guess.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1752920%22%20slang%3D%22en-US%22%3ERe%3A%20Check%20for%20overlap%20of%20Date%20and%20Time%20Formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1752920%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eyour%20formula%20hits%20the%20over%20lap%20perfectly%20but%20i%20need%26nbsp%3B%20another%26nbsp%3B%20formula%20to%20see%20if%20the%20start%20and%20finish%20date%20time%20event%20in%20sheet%20one%26nbsp%3B%20sits%20in%20between%26nbsp%3B%20a%20start%20and%20finish%20time%20in%20sheet%202%20.%3C%2FP%3E%3CP%3EI%20tired%20and%20couldn't%20get%20it%20to%20work%20I%20have%20included%20a%20snip%20on%20sheet%20one%20that%20highlights%20the%20scenario%20i%20want%20the%20formula%20to%20capture%26nbsp%3B%20.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks%20for%20your%20help%20and%20once%20I%20get%20over%20the%20amount%20data%20i%20have%20to%26nbsp%3B%20analysis%26nbsp%3B%20im%20going%20to%20spend%20some%20time%20learning%20about%20Xlookup%20.%20it%20look%20much%20more%20useful%20then%20Vlookup%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I am trying to find a formula to check overlap of Date and time in excel . I have a 2 worksheets each have columns of  start and Finish Date and Time Combined . I want to review each row  and give a yes if overlaps with a start or finish event in sheet 2 or no if I doesn't .  

7 Replies
Highlighted
Best Response confirmed by glen302 (New Contributor)
Solution

@glen302 Please have look at the attached workbook. I sorted the dat/time entries in sheet1 in ascending order. In sheet 2 I sorted the date/time entries in descending order.

 

Then on sheet1, I used XLOOKUP and INDEX/MATCH to find, for each start time the next largest starting time in sheet2 and compered it the ending time in sheet1. If it is less, then there is an overlap (TRUE) otherwise not (FALSE). If I have misunderstood, please give a few examples of entries that you consider to be overlapping and explain how you come to that conclusion.

 

Note that the ending dates/times in sheet1 were texts, so I converted them to real dates first using Text.to-columns.

Highlighted

@Riny_van_Eekelen  Thanks so much for your help , I would never have worked this out .  

This certainly shows if there was an overlap,  I would also like it to say true if is within a start and finish date and  time  event in sheet 2  is there a way i can add this to formula or add a column start a separate formula ?   

I suppose what I'm asking is does an event in Sheet 1 occur  in or overlap with  the date and time event  on sheet 2 

 

Highlighted

@glen302 I believe that is what my suggestion did. Show events from sheet1 that overlap events in sheet2. So, not sure what you mean by your last question. Can you find a type of overlap that doesn't not get picked-up by my formula and describe the logic of it. In other words, what steps did you go through in your mind to determine that this particular event is overlapping another. Then, a formula will not be all that difficult, I guess.

Highlighted

@Riny_van_Eekelen 

your formula hits the over lap perfectly but i need  another  formula to see if the start and finish date time event in sheet one  sits in between  a start and finish time in sheet 2 .

I tired and couldn't get it to work I have included a snip on sheet one that highlights the scenario i want the formula to capture  .

 

thanks for your help and once I get over the amount data i have to  analysis  im going to spend some time learning about Xlookup . it look much more useful then Vlookup

Highlighted

@glen302 See attached. Would that work?

Highlighted

@Riny_van_Eekelen  

yep that works great .   every scenario covered now thanks for help  

Highlighted

@glen302  You're welcome!