Calculate time intervals in minutes of sequential data

rdupree

New Member
Joined
Dec 15, 2021
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Ok so I need help calculating time interval data that is sequential in nature. To preface, this time data has already been filtered on a variable that isn't shown and I don't believe is necessary for this exercise. You will notice from my color shading where the time intervals break and pick back up.

I have several thousand rows of time stamped data, and I need to calculate the time interval (in minutes) over each and every interval of time. I've shown an example below to illustrate.
Column 1 = Date
Column 2 = Time (color shaded)
Column 3 = Time Interval in Minutes (done by hand for show)
The time stamps are consistently on a 15 min interval.

Is there a formula or function that I can use in excel to recognize the sequence, count the "chunks" of time in column 2, and put it in column 3?

Any help would be appreciated. If you need any further information, please feel free to ask.

Thank you in advance.

1639607071390.png
 
Maybe something like this (in my example below data begin in A2 - adjust the formula)

21122021 Testes.xlsx
ABC
1DateTimeResult
208/10/202100:15:0015
308/10/202102:45:00 
408/10/202103:00:00 
508/10/202103:15:00 
608/10/202103:30:00 
708/10/202103:45:00 
808/10/202104:00:00 
908/10/202104:15:0090
1008/10/202107:00:00 
1108/10/202107:15:00 
1208/10/202107:30:00 
1308/10/202107:45:00 
1408/10/202108:00:00 
1508/10/202108:15:00 
1608/10/202108:30:00 
1708/10/202108:45:00 
1808/10/202109:00:00120
1908/10/202109:45:0045
2008/10/202111:00:00 
2108/10/202111:15:00 
2208/10/202111:30:00 
2308/10/202111:45:00 
2408/10/202112:00:00 
2508/10/202112:15:00 
2608/10/202112:30:00 
2708/10/202112:45:00 
2808/10/202113:00:00 
2908/10/202113:15:00135
3008/10/202114:00:00 
3108/10/202114:15:00 
3208/10/202114:30:0030
Plan10
Cell Formulas
RangeFormula
C2:C32C2=IF(ROUND(MOD(B3-B2,1)*1440,0)<>15,IF(OR(ISNUMBER(C1),ROWS(C$2:C2)=1),MINUTE(B2),MOD(B2-INDEX(B$2:B2,IFERROR(MATCH(9.99E+307,C$1:C1),1)),1)*1440),"")


M.


Marcelo this is what I am looking for! Thank you very much! Just a few minor tweaks if that's ok. Offthelip is also correct. The numbers I used for examples of the output data I am looking for need 15min added to each, except where they show just one single time value. To shed more light, the times in column B represent 15min time intervals that average data (not attached) over that 15min interval. Not a time stamp.

For example, 7:00:00 = 7:00:00 to 7:15:00,
7:15:00 = 7:15:00 to 7:30:00,
7:30:00 = 7:30:00 to 7:45:00,
and so on...

So a time series from 7:00:00 - 7:30:00 actually represents 45min of time.

My mistake I should have been more clear.

Example sheet is below.

Is there a "clean" way to make that addition of 15min to each output given your formula. I can't say thank you enough for both of your help! Much appreciated.

2021 Mabank Interval Data_5MW and above Calcs.xlsx
ABC
55258/10/20210:15:0015
55268/10/20212:45:00
55278/10/20213:00:00
55288/10/20213:15:00
55298/10/20213:30:00
55308/10/20213:45:00
55318/10/20214:00:00
55328/10/20214:15:00105
55338/10/20217:00:00
55348/10/20217:15:00
55358/10/20217:30:00
55368/10/20217:45:00
55378/10/20218:00:00
55388/10/20218:15:00
55398/10/20218:30:00
55408/10/20218:45:00
55418/10/20219:00:00135
55428/10/20219:45:0015
55438/10/202111:00:00
55448/10/202111:15:00
55458/10/202111:30:00
55468/10/202111:45:00
55478/10/202112:00:00
55488/10/202112:15:00
55498/10/202112:30:00
55508/10/202112:45:00
55518/10/202113:00:00
55528/10/202113:15:00150
55538/10/202114:00:00
55548/10/202114:15:00
55558/10/202114:30:0045
KW >5000 FILTERED (2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B:BOther TypeColor scaleNO
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Sorry for the confusion. I do appreciate the help you provided.

Take care.

R
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

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