marklemachin
New Member
- Joined
- Mar 23, 2018
- Messages
- 9
[TABLE="width: 165"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]qty[/TD]
[TD]gp[/TD]
[TD]salesperson[/TD]
[TD]sku[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]4%[/TD]
[TD]andrew[/TD]
[TD="align: center"]#N/A[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]4%[/TD]
[TD]andrew[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]3%[/TD]
[TD]andrew[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]2%[/TD]
[TD]kyle[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]4%[/TD]
[TD]kyle[/TD]
[TD="align: center"]#N/A[/TD]
[/TR]
</tbody>[/TABLE]
I want the weighted average of column 2 in regards to column 1 when column 3 equals andrew and when column 4 does not equal #N/A.
My formula is this: =SUMPRODUCT(--(C2:C6="andrew"),--(D2:D6<>"#N/A"),B2:B6,A2:A6)/SUMPRODUCT(--(C2:C6="andrew"),--(D2:D6<>"#N/A"),A2:A6)
No matter how I twist the formula I get an #N/A error
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]qty[/TD]
[TD]gp[/TD]
[TD]salesperson[/TD]
[TD]sku[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]4%[/TD]
[TD]andrew[/TD]
[TD="align: center"]#N/A[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]4%[/TD]
[TD]andrew[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]3%[/TD]
[TD]andrew[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]2%[/TD]
[TD]kyle[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]4%[/TD]
[TD]kyle[/TD]
[TD="align: center"]#N/A[/TD]
[/TR]
</tbody>[/TABLE]
I want the weighted average of column 2 in regards to column 1 when column 3 equals andrew and when column 4 does not equal #N/A.
My formula is this: =SUMPRODUCT(--(C2:C6="andrew"),--(D2:D6<>"#N/A"),B2:B6,A2:A6)/SUMPRODUCT(--(C2:C6="andrew"),--(D2:D6<>"#N/A"),A2:A6)
No matter how I twist the formula I get an #N/A error