Averaging dynamic rows from bottom up

deb0578

Board Regular
Joined
Sep 8, 2010
Messages
62
Good evening. Is there a way to change this formula:

=TRUNC(AVERAGE(SMALL((G?:G?),{1,2,3,4,5,6,7,8,9,10}))*0.97,1)

to apply to the last 20 numbers in Column G? Rows are added daily to the worksheet and thus, the range changes daily. Thank you for your help.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Good evening. Is there a way to change this formula:

=TRUNC(AVERAGE(SMALL((G?:G?),{1,2,3,4,5,6,7,8,9,10}))*0.97,1)

to apply to the last 20 numbers in Column G? Rows are added daily to the worksheet and thus, the range changes daily. Thank you for your help.
Like this...

=TRUNC(AVERAGE(SMALL(OFFSET(G2,MATCH(1E100,G2:G1000)-1,,-20),{1,2,3,4,5,6,7,8,9,10}))*0.97,1)

I use G1000 as the end of range. Adjust as needed.

Looks like golf handicaps! ;)
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,308
Members
452,904
Latest member
CodeMasterX

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