max sum values of a time series per day

ckmoied01

New Member
Joined
Jan 8, 2024
Messages
11
Office Version
  1. 365
Platform
  1. Windows
Hi........I have historical data of every minute for the last 20 years...........and want to get the maximum and lowest of each hour

The data is tagged with time stamp in column B in the format e.g. 13:00.....13:59 ..... 14:00.....14:59 and so on

what is the best formula to get the max and min for each hour of the timeseries data

Thanks
ckm
 

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.
To be more precise.............i need 4 values out of the time series from each hour

Starting value of the Hour.......so at 00:00
Maximum value of the hour........so the max of 60 x 1 minute values
Minimum value of the hour........so the min of 60 x 1 minute values
Closing value of the hour .....so at 00:59

this goes on everay day with a date defined in column A

one small trouble is that the historical data is not very clean..............some of the minute values are missing in each hour............so some hours have 55 entries............some have 59 and so on............so the formula must read the start and end of the hour...........rather a fixed offset of rows
 
Upvote 0
finding some trouble to load the file..................but here is a sample of the data from columns A to G

A is date, B is time, C to F is Open, High, Low and Close of each minute........and G is to be ignored

I need for each hour...........the Open Price so col C at XX:00
High Price .........so the max of col D for the hour between xx:00 and xx:59
Min Price........so the min of col E between xx:00 and xx:59
Close price ............so the Col F at xx:59

as already mentioned...............some hours have less than 60 entries so offset function will not work here...........formula must read the timestamp

02.01.201118:001418.151418.881417.931418.88118
02.01.201118:011418.981419.331418.831418.9396
02.01.201118:021419.031419.131418.631418.6361
02.01.201118:031418.581418.581417.151417.15144
02.01.201118:041417.181417.581416.931417.5891
02.01.201118:051417.551417.831417.331417.5898
02.01.201118:061417.601418.131417.551418.0374
02.01.201118:071417.951417.951417.481417.5353
02.01.201118:081417.501417.581417.431417.5823
02.01.201118:091417.651418.251417.651418.0581
02.01.201118:101418.081418.481418.081418.1574
02.01.201118:111418.131418.231418.081418.0826
02.01.201118:121418.051418.151418.051418.1313
02.01.201118:131418.151418.381418.131418.3333
02.01.201118:141418.351418.431418.351418.439
02.01.201118:151418.331418.431418.231418.3836
02.01.201118:161418.351418.351418.131418.1828
02.01.201118:171418.151418.151418.031418.0313
02.01.201118:181417.981417.981417.831417.8316
02.01.201118:191417.851417.901417.631417.8050
02.01.201118:201417.831418.231417.831418.0856
02.01.201118:211418.151418.231417.981417.9834
02.01.201118:221417.951417.951417.931417.933
02.01.201118:231417.951417.951417.701417.8844
02.01.201118:241417.901417.931417.781417.8324
02.01.201118:251417.731417.731417.281417.2846
02.01.201118:261417.351417.831417.351417.6864
02.01.201118:271417.651417.681417.581417.5814
02.01.201118:281417.551417.581417.381417.3824
02.01.201118:291417.451417.581417.451417.4824
02.01.201118:301417.451417.501417.431417.4812
02.01.201118:321417.501417.951417.501417.9546
02.01.201118:331417.981417.981417.981417.981
02.01.201118:341417.931417.931417.431417.4351
02.01.201118:351417.401417.401417.231417.2318
02.01.201118:371417.181417.181416.831416.8336
02.01.201118:381416.731416.731416.731416.731
02.01.201118:391416.781416.781416.781416.781
02.01.201118:401416.831417.031416.831417.0321
02.01.201118:411417.181417.381417.131417.1346
02.01.201118:421417.081417.631417.081417.6356
02.01.201118:431417.581417.881417.581417.6356
02.01.201118:441417.531417.531417.281417.2826
02.01.201118:451417.331417.331417.331417.331
02.01.201118:471417.381417.381417.381417.381
02.01.201118:481417.481417.731417.481417.7326
02.01.201118:491417.781418.081417.781418.0336
02.01.201118:501418.381418.381418.081418.1841
02.01.201118:511418.081418.081418.031418.036
02.01.201118:541418.001418.001417.831417.8318
02.01.201118:551417.801417.801417.301417.3051
02.01.201118:561417.281417.281417.131417.1316
02.01.201118:571417.101417.101417.031417.038
02.01.201118:581417.001417.001417.001417.001
02.01.201118:591416.981416.981416.981416.981
02.01.201119:001416.831416.931416.831416.8816
02.01.201119:011416.831416.881416.631416.6331
02.01.201119:021416.601416.601415.631415.73108
02.01.201119:031415.781415.981415.581415.7376
02.01.201119:041415.581415.581415.381415.4831
02.01.201119:051415.581415.581415.481415.5316
02.01.201119:061415.581415.631415.481415.4821
02.01.201119:071415.381415.381415.181415.1821
02.01.201119:081415.331415.331415.181415.1816
02.01.201119:091415.331415.331414.981415.0846
02.01.201119:101414.881414.981414.381414.3871
02.01.201119:111414.081414.181413.981414.1336
02.01.201119:121414.231414.531414.131414.2876
02.01.201119:131414.481415.081414.481414.9376
02.01.201119:141415.031415.431415.031415.2361
02.01.201119:151415.381415.531415.081415.4386
02.01.201119:161415.231415.231414.781414.8351
02.01.201119:171414.781414.881414.731414.8326
02.01.201119:181414.931414.931414.881414.886
02.01.201119:191415.231415.231415.181415.2311
02.01.201119:201414.831415.531414.831415.5371
02.01.201119:211415.581415.781415.381415.4871
02.01.201119:221415.631415.631415.131415.1351
02.01.201119:231415.181415.631415.131415.6356
02.01.201119:241415.531415.631415.431415.4331
02.01.201119:251415.381415.531415.331415.5326
02.01.201119:261415.481416.081415.481416.0861
02.01.201119:271416.131416.931416.131416.9381
02.01.201119:281417.081417.081416.731416.7841
02.01.201119:291416.681416.681416.581416.6013
02.01.201119:301416.631416.751416.631416.7315
02.01.201119:311416.681416.681416.201416.2857
02.01.201119:321416.301416.401416.151416.3051
02.01.201119:331416.231416.351416.151416.2836
02.01.201119:341416.331416.351416.201416.2826
02.01.201119:351416.301416.331416.151416.3334
02.01.201119:361416.351416.701416.351416.7036
02.01.201119:371416.681416.751416.351416.6578
02.01.201119:381416.531416.531416.431416.4816
02.01.201119:391416.331416.481416.281416.3341
02.01.201119:401416.431416.431416.131416.1836
02.01.201119:411416.131416.181416.081416.1321
02.01.201119:421416.181416.331416.131416.1841
02.01.201119:431416.281416.281416.131416.1821
02.01.201119:441416.081416.181416.081416.1811
02.01.201119:451416.131416.181416.131416.186
02.01.201119:461416.081416.181416.031416.0326
02.01.201119:471415.981416.181415.981416.1326
02.01.201119:481416.181416.181416.131416.136
02.01.201119:491415.981415.981415.981415.981
02.01.201119:511415.931415.931415.881415.886
02.01.201119:521415.781415.781415.481415.4831
02.01.201119:531415.381415.381415.031415.0336
02.01.201119:541414.981414.981414.851414.8817
02.01.201119:551414.951415.001414.881414.9525
02.01.201119:561414.981414.981414.751414.7827
02.01.201119:571414.951415.451414.951415.4551
02.01.201119:581415.431415.681415.131415.5896
02.01.201119:591415.631415.881415.631415.8826
 
Upvote 0
Try. In H2. Change the ranges as per your file. This is for the sample data in A2:G115.
Excel Formula:
=LET(tm,B2:B115,op,C2:C115,hi,D2:D115,lo,E2:E115,cl,F2:F115,Rop,MAP(tm,op,LAMBDA(xa,ya,IF(MINUTE(xa)=0,ya,""))),Rmx,MAP(tm,hi,LAMBDA(xb,yb,IF(MINUTE(xb)=0,MAX(IF(HOUR(tm)=HOUR(xb),hi,"")),""))),Rmn,MAP(tm,lo,LAMBDA(xc,yc,IF(MINUTE(xc)=0,MIN(IF(HOUR(tm)=HOUR(xc),lo,"")),""))),Rcl,MAP(tm,cl,LAMBDA(xd,yd,IF(MINUTE(xd)=0,INDEX(cl,MAX(IF(HOUR(tm)=HOUR(xd),ROW(cl),""))-ROW($F$1)),""))),HSTACK(Rop,Rmx,Rmn,Rcl))
H1:K1
OPENMAXMINCLOSE
 
Upvote 0
dear can you pls share the excel file where you could have this formula worked..............my excel is in german version and is not accepting the function of LET
 
Upvote 0

Forum statistics

Threads
1,224,747
Messages
6,180,708
Members
452,994
Latest member
Janick

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