Split list/table according to specified time gap

Kariba

Board Regular
Joined
Mar 15, 2023
Messages
59
Office Version
  1. 365
Platform
  1. Windows
Hi, hope you can help. I have a table with 19 columns (and 50k + rows) which changes 3 times a week. One of the columns is times. I need to divide this where there is at least a 20 minute gap from the row above. I was thinking of identifying in a new column T eg 1, 2, 3 etc but having trouble getting it to work.

On the table below, Row 2 & 5 could be group 1, Row 3 & 8 could be group 2 etc. An added complication is there can be no more than 6 in each group.

Book1
ABCDEFGHIJKLMNOPQRSTU
1ABCDEFGHIJKLMNOPQRST
201/01/202401/01/2024 06:0017
301/01/202401/01/2024 06:1017
401/01/202401/01/2024 06:1517
501/01/202401/01/2024 06:2017
601/01/202401/01/2024 06:2517
701/01/202401/01/2024 06:2517
801/01/202401/01/2024 06:3017
901/01/202401/01/2024 06:3017
1001/01/202401/01/2024 06:4017
1101/01/202401/01/2024 06:4017
1201/01/202401/01/2024 06:4517
1301/01/202401/01/2024 06:5517
1401/01/202401/01/2024 06:5517
1501/01/202401/01/2024 06:5517
1601/01/202401/01/2024 06:5517
1701/01/202401/01/2024 07:0017
1801/01/202401/01/2024 07:0017
Sheet1
Cell Formulas
RangeFormula
T2:T18T2=COUNTIFS($G$1:$G$1000,">="&TIME(0,20,0))
 
Ok, I think I am getting it. It is more complicated than I thought. Maybe someone more clever than ne can help you.aq
 
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,224,823
Messages
6,181,185
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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