Rolling average ignoring cells that have text or are blank

tafkap777

New Member
Joined
Dec 19, 2016
Messages
13
I have a group with 32 members. Each day, I enter in their scores from that day's completed games. I keep track of their average score for the most recent 10 days, and have typically just manually adjusted the range (for example I manually change A2:J2 to B2:K2).

In playing around with rolling averages today, I was able to successfully find a formula that works, but only if the most recent 10 cells in the row contain numbers. If they are blank or contain text, I get an error.

So my question is, how can my rolling average formula be improved so that it will ignore cells that are blank or contain text. =AVERAGE((OFFSET(A2,0,COUNT(A2:ZZ2)-10,1,10)))

I've tried to paste a picture below of my spreadsheet, but can't. Boy...just fail after fail today.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
[FONT=arial, sans, sans-serif]When I enter it in the Google Sheets doc, it produces an error that says, "Function OFFSET parameter 4 value is -9. It should be greater than or equal to 1."

When I enter it into Excel, it works beautifully, but doesn't change when I add in new numbers from todays game. I experimented by adding in a score of 1 in DI16:DI21, but the average in C16 stayed at 22.
[/FONT]
 
Upvote 0
When I enter it in the Google Sheets doc, it produces an error that says, "Function OFFSET parameter 4 value is -9. It should be greater than or equal to 1."

When I enter it into Excel, it works beautifully, but doesn't change when I add in new numbers from todays game. I experimented by adding in a score of 1 in DI16:DI21, but the average in C16 stayed at 22.

If DI1 has not date, the scores entered DI2, DI3,...,DI16, etc. won't affect any average at all.

The formula is:

=average(offset(index(D2:XFD2,match(9.99999999999999E+307,$D$1:$XFD$1)),0,0,1,min(10,columns($D$1:$XFD$1))))

not:

=average(offset(index(D2:XFD2,match(9.99999999999999E+307,$D$1:$XFD$1)),0,0,1-min(10,columns($D$1:$XFD$1))))
<strike>
</strike>
 
Upvote 0
You are an absolute genius. This works perfectly. I've spent many hours trying to figure this out over the past year or so, and really don't understand how this formula works, but the fact is that it does work.

Thank you so much for your time and help in guiding me through this. I really appreciate it!
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,199
Members
453,022
Latest member
RobertV1609

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