Averaging Data Set

ZochSteveo

New Member
Joined
Dec 21, 2024
Messages
30
Office Version
  1. 2024
Platform
  1. MacOS
Hi there,

So I have a list of times at intervals of every 5 minutes for about 7 months or so. For each 5 minute interval, there is a corresponding value for the temperature as well. I need to average the values for all recordings of the temperature for each respective day. Is there a fast way of me being able to do this?

The times are as follows for example: 04/01/2024 00:00, 04/01/2024 00:05, 04/01/2024 00:10 etc. and for each time stamp there is a corresponding temperature value. I need to average each temperature value for the whole day, and do this for every day in which there are around 7 months worth,

Practice Analysis.xlsx
AB
3TimeExternal data
41/4/24 0:008.703 °C
51/4/24 0:058.743 °C
61/4/24 0:108.676 °C
71/4/24 0:158.664 °C
81/4/24 0:208.743 °C
91/4/24 0:258.673 °C
101/4/24 0:308.596 °C
111/4/24 0:358.569 °C
121/4/24 0:408.586 °C
131/4/24 0:458.637 °C
141/4/24 0:508.595 °C
151/4/24 0:558.499 °C
161/4/24 1:008.340 °C
171/4/24 1:058.421 °C
181/4/24 1:108.341 °C
191/4/24 1:158.353 °C
201/4/24 1:208.191 °C
211/4/24 1:258.272 °C
221/4/24 1:308.090 °C
231/4/24 1:358.115 °C
241/4/24 1:408.017 °C
251/4/24 1:458.082 °C
261/4/24 1:507.971 °C
271/4/24 1:557.924 °C
281/4/24 2:007.880 °C
291/4/24 2:057.918 °C
301/4/24 2:107.913 °C
311/4/24 2:157.835 °C
321/4/24 2:207.916 °C
331/4/24 2:257.755 °C
341/4/24 2:307.925 °C
351/4/24 2:357.922 °C
361/4/24 2:407.925 °C
371/4/24 2:457.980 °C
381/4/24 2:508.001 °C
391/4/24 2:557.958 °C
401/4/24 3:007.989 °C
411/4/24 3:057.960 °C
421/4/24 3:107.987 °C
431/4/24 3:158.070 °C
441/4/24 3:208.032 °C
451/4/24 3:258.014 °C
461/4/24 3:307.933 °C
471/4/24 3:358.032 °C
481/4/24 3:407.961 °C
491/4/24 3:457.978 °C
501/4/24 3:507.913 °C
511/4/24 3:557.826 °C
521/4/24 4:007.735 °C
531/4/24 4:057.623 °C
541/4/24 4:107.535 °C
551/4/24 4:157.411 °C
561/4/24 4:207.298 °C
571/4/24 4:257.244 °C
581/4/24 4:307.142 °C
591/4/24 4:356.968 °C
601/4/24 4:406.842 °C
611/4/24 4:456.744 °C
621/4/24 4:506.770 °C
631/4/24 4:556.764 °C
641/4/24 5:006.715 °C
651/4/24 5:056.554 °C
661/4/24 5:106.569 °C
671/4/24 5:156.602 °C
681/4/24 5:206.488 °C
691/4/24 5:256.346 °C
701/4/24 5:306.369 °C
711/4/24 5:356.246 °C
721/4/24 5:406.149 °C
731/4/24 5:455.969 °C
741/4/24 5:506.063 °C
751/4/24 5:555.829 °C
761/4/24 6:005.838 °C
771/4/24 6:055.836 °C
781/4/24 6:105.507 °C
791/4/24 6:155.703 °C
801/4/24 6:205.620 °C
811/4/24 6:255.879 °C
821/4/24 6:305.696 °C
831/4/24 6:355.598 °C
841/4/24 6:405.640 °C
851/4/24 6:455.683 °C
861/4/24 6:505.773 °C
871/4/24 6:555.645 °C
881/4/24 7:005.612 °C
891/4/24 7:055.580 °C
901/4/24 7:105.706 °C
911/4/24 7:155.972 °C
921/4/24 7:206.006 °C
931/4/24 7:256.137 °C
941/4/24 7:306.129 °C
951/4/24 7:356.266 °C
961/4/24 7:406.430 °C
971/4/24 7:456.545 °C
981/4/24 7:506.936 °C
991/4/24 7:557.210 °C
1001/4/24 8:007.282 °C
1011/4/24 8:057.429 °C
1021/4/24 8:107.500 °C
1031/4/24 8:157.636 °C
1041/4/24 8:207.747 °C
1051/4/24 8:258.145 °C
1061/4/24 8:308.344 °C
1071/4/24 8:358.433 °C
1081/4/24 8:408.554 °C
1091/4/24 8:458.763 °C
1101/4/24 8:508.875 °C
1111/4/24 8:559.089 °C
1121/4/24 9:009.266 °C
1131/4/24 9:059.658 °C
1141/4/24 9:109.579 °C
1151/4/24 9:159.749 °C
1161/4/24 9:209.764 °C
1171/4/24 9:259.884 °C
1181/4/24 9:3010.028 °C
1191/4/24 9:3510.180 °C
1201/4/24 9:4010.855 °C
1211/4/24 9:4510.938 °C
1221/4/24 9:5010.917 °C
1231/4/24 9:5511.600 °C
1241/4/24 10:0012.050 °C
Sheet1
 
Just list the relevant dates.
- list the required dates or
- prepare a unique list of dates

What data do you have and what type of summary do you require?

Does Excel 2024 have Groupby?
So, I have data for every 5 minute intervals from the following dates: 31/03/2024 until 30/09/2024 (please note these are UK dating system, not American). Each one of these days has a temperature reading for every 5 minutes. I need the average temperature of each day.
 
Upvote 0
It would be very helpful if you answered the questions.

I will assume that your Excel does not have Groupby.
I will assume that you do not want to use Excel's Data | Groupby to provide the the averages.

List the dates or use sequence to list the dates and then edit the ranges and use the formula.

T202503a.xlsm
CD
9Fill down
1031-Mar-2431-Mar-24
111-Apr-241-Apr-24
122-Apr-242-Apr-24
133-Apr-243-Apr-24
144-Apr-244-Apr-24
155-Apr-245-Apr-24
166-Apr-246-Apr-24
2d
Cell Formulas
RangeFormula
D11:D16D11=D10+1
 
Upvote 0
It would be very helpful if you answered the questions.

I will assume that your Excel does not have Groupby.
I will assume that you do not want to use Excel's Data | Groupby to provide the the averages.

List the dates or use sequence to list the dates and then edit the ranges and use the formula.

T202503a.xlsm
CD
9Fill down
1031-Mar-2431-Mar-24
111-Apr-241-Apr-24
122-Apr-242-Apr-24
133-Apr-243-Apr-24
144-Apr-244-Apr-24
155-Apr-245-Apr-24
166-Apr-246-Apr-24
2d
Cell Formulas
RangeFormula
D11:D16D11=D10+1
I have been using Excel primarily on the web as that is where I can access all the data on the cloud. This does allow me to use the groupby function, so I do have it available.So I can use Groupby
 
Upvote 0
For headers, totals, etc. see Excel's help for the function Groupby.
If you require additional information such as count, see the second example

My example uses a fairly recent addition TrimRange. If you do not have TrimRange, use your actual ranges.

Format the dates to your preference.

T202503a.xlsm
CDEFG
20Current version of 365
21
22452957.682504
234529611.825
24
25 AVERAGECOUNTMAXMIN
26452957.68250412112.055.507
274529611.825212.0511.6
28
2d
Cell Formulas
RangeFormula
C22:D23C22=GROUPBY(INT(A.:.A),--LEFT(B.:.B,5),AVERAGE,1,0)
C25:G27C25=GROUPBY(INT(A.:.A),--LEFT(B.:.B,5),HSTACK(AVERAGE,COUNT,MAX,MIN),1,0)
Dynamic array formulas.
 
Upvote 0
With Power Query, if all your data is in the two columns as in your sample, then highlight the entire range of data, click on Ctl +T to make it a table. Then put your cursor in any cell in the table and bring it into Power Query Editor. Data-->Get and Transform Data-->From Table or Range. Then use the groupby in the PQ Editor to get the Average for each date after you have split the column to remove the degree symbol and the C. My code does all this.
 
Upvote 0
It would not allow me to add everything in the mini XL2BB sheet
So in future you could reduce the number of entries per day like I have below, just to demonstrate the concept.
Would something like this be any use?

25 03 10.xlsm
ABCDE
3TimeExternal dataDateAverage
44/01/2024 0:008.703 °C4/01/20248.661444444
54/01/2024 0:058.743 °C5/01/20248.3739
64/01/2024 0:108.676 °C6/01/20248.04625
74/01/2024 0:158.664 °C7/01/20247.917214286
84/01/2024 0:208.743 °C 
94/01/2024 0:258.673 °C 
104/01/2024 0:308.596 °C
114/01/2024 0:358.569 °C
124/01/2024 0:408.586 °C
135/01/2024 0:458.637 °C
145/01/2024 0:508.595 °C
155/01/2024 0:558.499 °C
165/01/2024 1:008.340 °C
175/01/2024 1:058.421 °C
185/01/2024 1:108.341 °C
195/01/2024 1:158.353 °C
205/01/2024 1:208.191 °C
215/01/2024 1:258.272 °C
225/01/2024 1:308.090 °C
236/01/2024 1:358.115 °C
246/01/2024 1:408.017 °C
256/01/2024 1:458.082 °C
266/01/2024 1:507.971 °C
277/01/2024 1:557.924 °C
287/01/2024 2:007.880 °C
297/01/2024 2:057.918 °C
307/01/2024 2:107.913 °C
317/01/2024 2:157.835 °C
327/01/2024 2:207.916 °C
337/01/2024 2:257.755 °C
347/01/2024 2:307.925 °C
357/01/2024 2:357.922 °C
367/01/2024 2:407.925 °C
377/01/2024 2:457.980 °C
387/01/2024 2:508.001 °C
397/01/2024 2:557.958 °C
407/01/2024 3:007.989 °C
41
Average
Cell Formulas
RangeFormula
D4:D7D4=UNIQUE(INT(A4:A40))
E4:E9E4=IF(D4="","",AVERAGE(IF(INT(A4:A40)=D4,--SUBSTITUTE(B4:B40,"°C",""))))
Dynamic array formulas.



Does Excel 2024 have Groupby?
That is pretty easy to check by looking at 'Applies to' in the function's help which can easily be accessed here
 
Upvote 0
With Power Query, if all your data is in the two columns as in your sample, then highlight the entire range of data, click on Ctl +T to make it a table. Then put your cursor in any cell in the table and bring it into Power Query Editor. Data-->Get and Transform Data-->From Table or Range. Then use the groupby in the PQ Editor to get the Average for each date after you have split the column to remove the degree symbol and the C. My code does all this.
Hi there,

Thank you for all of your help.

I think I am nearly there. My only issue is that currently, the power query function is displaying this current error message. Please see attached image
 

Attachments

  • Power Query.jpg
    Power Query.jpg
    205.8 KB · Views: 3
Upvote 0
How is your data in the column holding 7.66677 formatted in Power Query? Decimal? Text? Something else? In the Mcode I provided, I changed the format to a Decimal. Did you? Did you modify the Mcode I provided?
 
Upvote 0

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