Forum Discussion
Dennis2
Oct 13, 2025Occasional Reader
Average values for several parameters based on date and time ranges
I am searching for the Excel formula to calculate average values for several parameters based on date and time ranges. Yellow cells in the snapshot below are the ones I want to fill in with the formula. My goal is to be able to just change the date and time range and get the average. Columns F to J are minute-by-minute data. I have days of such data.
1 Reply
- m_tarlerBronze Contributor
So the easiest is to use the function AVERAGEIFS. Here are 2 examples:
a) using ranges:
=AVERAGEIFS($G$3:$G$18,$F$3:$F$18,">="&B$3+B$4,$F$3:$F$18,"<="&B$3+B$5)
b) using table reference (need to format datatable using Format as Table)
=AVERAGEIFS(Table1[Parameter 2],Table1[Date - Time],">="&B$3+B$4,Table1[Date - Time],"<="&B$3+B$5)
as you copy down/right you will have to update some of the references accordingly