Help Find Averages based on column for different row ranges

Argento_Nuclear

New Member
Joined
Apr 5, 2019
Messages
5
Hi! I am trying to find averages for certain time steps based on the column name. I am trying to find a sort of moving average but it needs to be done per sensor. A simple example of what I am trying to do is below.

TimeS1S2S3S4S5S6S7
13518181681
268168168181
3682868568179
4198116844
5648186648357
6898444684488
768416844848648648

<tbody>
</tbody>

I want to be able to find the average in column s2, s3 and s6 from time 1-3 and 5-7. Because I have to fill out a table like this below:
Column NameAVG t=1-3Std. Dev t=1-3Avg t= 5-7Std.Dev t= 5-7
s2
s3
s6

<tbody>
</tbody>

Is there a way I could use one formula and autofill or use minor modifications to autofill the rest of the table? Ive tried indexing and matching but I cannot seem to get it to work using row ranges.

Thanks!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Put your first table in A1:H8. Then set up the second like this in A10:B14.

1
3
s2
s3
s6

<colgroup><col style="width:48pt" width="64" span="2"> </colgroup><tbody>
</tbody>



This does average:

=AVERAGEIFS(INDEX($B$2:$H$8,,MATCH($A12,$B$1:$H$1,0)),$A$2:$A$8,">="&B$10,$A$2:$A$8,"<="&B$11)

This, which requires CTRL-SHIFT-ENTER to enter, does standard deviation:

=STDEV.S(IF($A$2:$A$8>=B$10,IF($A$2:$A$8<=B$11,INDEX($B$2:$H$8,,MATCH($A12,$B$1:$H$1,0)))))
 
Last edited:
Upvote 0
If I format my table as a table with headers, could I do the same thing using the time values as ranges? I have a very similar table already set up but they are just in different sheets.
 
Upvote 0
It does work if you follow the instructions. Which formula gives the value error?
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,384
Members
448,956
Latest member
JPav

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