Moving average on filtered table

ArnoJeroen

New Member
Joined
Feb 8, 2018
Messages
1
I have a simple worksheet with a table with 3 columns and >400 rows.
In column A are names (not unique) , in column B are measured values, and in column C I want to have the moving average of the last 8 values of column B
So, in cell C14 the formula is "=average(B7:B14)" or "=subtotal(101;B7:B14)", and in cell C333 the formula is "=average(B326:B333)", etc. , this works fine.
But when I filter the table on a value in column A, I would like to have in column C the moving average calculated on the VISIBLE last 8 values in column B. With the formulas I used, it still calculates with also the invisible values in column B.
How can I get this done the right way?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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