Creating a Formula to Automatically Update Average Weather Temperature

doops

New Member
Joined
Dec 8, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,

I'm working on updating an Excel sheet that has collects weather temperatures throughout the day at different times. The data is organized by date and there are about 10-13 temperature inputs per each date. I've been trying to write a formula using "=averageif()" to create a "tool" that will automatically calculate the average when data is put in for a new date. The data is not continuous outside the specific date. I haven't been able to figure it out and feel like I'm missing something and it's much easier than what I'm trying to do.

TLDR.
I need a formula that automatically calculates the average weather temperature on the "blank" date it was collected.
 

Attachments

  • temp_data.PNG
    temp_data.PNG
    26.9 KB · Views: 44

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
the "blank" date it was collected.
I'm not following what that means.

automatically calculate the average when data is put in for a new date
This will give you the average C temperature for the most recent date, which is what it sounds like you want. Use D:D to get F temperature. If that's not quite what you want, try to reword your request.
Excel Formula:
=AVERAGEIF($B:$B,">="&INT(MAX($B:$B)),C:C)

(Just a tip: In the future if you have a data table, put the data itself into your post instead of a picture. That way we can test with your data. Most people aren't going to type all of that in.)
 
Upvote 0
The "blank" date is referring to the dates in the data. Such as 6/22/2021 or 6/23/2021. I'm hoping to create a formula that automatically calculates the average for each date. Here is the data too!
#Date-Time (CST)Ch: 1 - Temperature (°C)Ch: 1 - Temperature (°F)
106/22/2021 10:00:0024.407548828125
75.93358789​
206/22/2021 11:00:0026.68126953125
80.02628516​
306/22/2021 12:00:0025.866162109375
78.5590918​
406/22/2021 13:00:0026.4238671875
79.56296094​
506/22/2021 14:00:0025.30845703125
77.55522266​
606/22/2021 15:00:0024.664951171875
76.39691211​
706/22/2021 16:00:0024.922353515625
76.86023633​
806/22/2021 17:00:0025.7374609375
78.32742969​
906/22/2021 18:00:0026.252265625
79.25407813​
 
Upvote 0
I do not see any examples of what you are calling a "blank" date. Do you mean that at the start each day's data, there is a cell with just the date, following by the date/times for that date? And each time that happens you want to show the average temp for that date? If so then:

$scratch.xlsm
ABCDEF
1#Date-Time (CST)Ch: 1 - Temperature (°C)Ch: 1 - Temperature (°F)Average Temperature (°C)Average Temperature (°F)
26/22/21 0:00:0025.5849262278.05286719
316/22/21 10:00:0024.4075488375.93358789  
426/22/21 11:00:0026.6812695380.02628516  
536/22/21 12:00:0025.8661621178.5590918  
646/22/21 13:00:0026.4238671979.56296094  
756/22/21 14:00:0025.3084570377.55522266  
866/22/21 15:00:0024.6649511776.39691211  
976/22/21 16:00:0024.9223535276.86023633  
1086/22/21 17:00:0025.7374609478.32742969  
1196/22/21 18:00:0026.2522656379.25407813  
12106/23/21 0:00:0026.9738151180.55286719
13116/23/21 10:00:0025.7964377278.43358789  
14126/23/21 11:00:0028.0701584282.52628516  
15136/23/21 12:00:0027.25505181.0590918  
16146/23/21 13:00:0027.8127560882.06296094  
17156/23/21 14:00:0026.6973459280.05522266  
18166/23/21 15:00:0026.0538400678.89691211  
19176/23/21 16:00:0026.3112424179.36023633  
20186/23/21 17:00:0027.1263498380.82742969  
21196/23/21 18:00:0027.6411545281.75407813  
TEmps
Cell Formulas
RangeFormula
E2:F21E2=IF($B2=INT($B2),AVERAGEIFS(C:C,$B:$B,"<="&$B2+1,$B:$B,">"&$B2),"")
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,857
Members
449,051
Latest member
excelquestion515

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