Weighted Conditional Standard Deviation

jbecks0505

New Member
Joined
Jul 9, 2021
Messages
3
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
  2. Web
Hi all,

I'm looking for a way to find a weighted standard deviation with a conditional contained within. The formula for for the conditional weighted average is =SUMPRODUCT(--(RM_Done=1),RoughMill,Balance)/SUMIFS(Balance,RM_Done,1) however when I try to turn this into standard deviation (which would be =SQRT(SUMPRODUCT((RoughMill-B2)^2,Balance)/SUMIFS(Balance,RM_Done,1)) ) i'm met with a #VALUE formula. Weights are in the named range "Balance", values are in "RoughMill".

Any help on resolving this would be greatly appreciated.

Thanks!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Maybe (I assume B2 is the weighted mean in your formula).
SQRT(SUMPRODUCT((RM_Done=1)*(RoughMill-B2)^2,Balance)/SUMIFS(Balance,RM_Done,1))
 
Upvote 0
AhoyNC,

Thanks for the reply, yes B2 is the weighted mean. I inputted this and still comes back with #VALUE! error. I believe this is due to the fact that there are blanks in the RoughMill data range, any way around that issue?
 
Upvote 0
Are they actually blank or is there a formula in the cell? What about your Balance range, what is in it if the RoughMill data cell is blank?
 
Upvote 0
Are they actually blank or is there a formula in the cell? What about your Balance range, what is in it if the RoughMill data cell is blank?
Formula in cell so not actually blank. Balance range has values regardless of what's in RoughMill.
 
Upvote 0
What is the formula?
I assume you are looking for rows where RM_Done is equal to 1.
Can there be a blank (formula that returns a blank) in RoughMill where RM_Done=1? If so, wouldn't your SUMIFS(Balance,RM_Done,1) in your weighted average formula give you an erroneous answer by summing numbers in the Balance column when the RoughMill column is blank?
It would help if you could post a small sample of your data.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,757
Members
448,991
Latest member
Hanakoro

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