szita2000

Board Regular
Joined
Apr 25, 2012
Messages
101
Office Version
  1. 365
Platform
  1. Windows
Hi guys.

I have a crazy file where weighted average being calculated.
Now, unfortunately it is a file made to a specific format so we couldn't use sumproduct on the two ranges.
Rather the formula looks something like this:
=((O99*$CM$74)+(O108*$CM$77)+(O113*$CM$78)+(O123*$CM$80)+(O128*$CM$82)+(O133*$CM$83)+(O137*$CM$84)+(O179*$CM$89))/SUM($CM$74,$CM$77:$CM$78,$CM$80:$CM$84,$CM$89)
My question is.
How can I exclude the corresponding weight (Column CM) if there is no data for the actual month (Column O above).
(Small clarification needed for the above: The values in column CM are for a whole month, but in some weeks we don't get any KPIs on some of the left hand side ranges (Lines are not running))

My initial reaction was that I can only do this with individual if formulas? (IF there is no KPI then volume = 0) so on so forth...

Am I missing something here?

Thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Unfortunately your clarification is wholly confusing. At least to me it is. I must be missing something as if either O99 or CM74 are zero then O99*$CM$74 also equals zero.
 
Upvote 0
You'd need to exclude it from the sum section using something like:

Excel Formula:
SUM(IF(O74=0,0,$CM$74),SUMIF(O77:O78,">0",$CM$77:$CM$78),SUMIF(O80:O84,">0",$CM$80:$CM$84),IF(O89=0,0,$CM$89))

depending on the actual layout of the sheet, this may be able to be shortened if there's an indicator of some sort as to which rows should be used.
 
Upvote 0
You'd need to exclude it from the sum section using something like:

Excel Formula:
SUM(IF(O74=0,0,$CM$74),SUMIF(O77:O78,">0",$CM$77:$CM$78),SUMIF(O80:O84,">0",$CM$80:$CM$84),IF(O89=0,0,$CM$89))

depending on the actual layout of the sheet, this may be able to be shortened if there's an indicator of some sort as to which rows should be used.
Thanks Rory.
This seems doable.
Unfortunately the whole sheet's layout has been made to a format I wouldn't have approved, but it is a sheet that stuck with us since someone put it together.
It is one of those One week one column, BUT we ensist on putting the month end on as a column, in to the week columns.
Oh well. Admin's life. What you gonna do. :D Thanks for the help though.
 
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,072
Latest member
DW Draft

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