Averaging with weighted numbers

andrewb90

Well-known Member
Joined
Dec 16, 2009
Messages
1,077
Hello,

I have a set of number I am trying to average, but am having a problem. In cells c6:c10 I have numbers (130 in this case) in cell c4 I also have 130, in c5 I have 4. c5 represents that the 130 from c4 is an average of 4 numbers. What I am trying to get is the average of all the numbers. (I know that it is currently 130, but I can't seem to get the formula to reflect that) the number in C5 (my weighted number) will frequently change as will all the other averages.

Any help would be greatly appreciated!

Thanks,

Andrew
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Maybe you could post a tabular example?
 
Upvote 0
This is an average from another sheet130
this is 4 previous weeks averaged to get above number4
this is week 1130
this is week 2130
week 3130
week 4130
week 5130
the total average. In this instance, it would be 9 weeks of data. ???

<tbody>
</tbody>
 
Upvote 0
In B8,

=(B2*B1+SUM(B3:B7)) / (B2+ROWS(B3:B7))
 
Upvote 0
Thank you!
It works very well, however is there a way to adjust if one or more cells in b3:b7 had a value of '-' or '0'?
 
Upvote 0
'Adjust' in what way? What do you want it to do?
 
Upvote 0
=(B2*B1+SUM(B3:B7)) / (B2+Count(B3:B7))

Replace zero with blanks if you don't want them included.
 
Upvote 0
Hi

To exclude '-' or '0' values, using shg's solution:

=(B2*B1+SUM(B3:B7)) / (B2+CountIf(B3:B7,">0"))
 
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,318
Members
449,218
Latest member
Excel Master

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