Sumproduct with multiple text criteria giving an #N/A error (Weighted Average Formula)

marklemachin

New Member
Joined
Mar 23, 2018
Messages
9
qtygpsalespersonsku
14%andrew#N/A
14%andrew2
23%andrew2
32%kyle2
44%kyle#N/A

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>


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
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
So now I'm back to my original problem... so for this example with the sku colum not having any numbers. I apologize for giving the wrong data before.

qtygpsalespersonsku
14%andrew#N/A
14%andrewcrank
23%andrewsmpm
32%kylehat3
44%kyle#N/A

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

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)
 
Upvote 0
So now I'm back to my original problem... so for this example with the sku colum not having any numbers. I apologize for giving the wrong data before.

qtygpsalespersonsku
14%andrew#N/A
14%andrewcrank
23%andrewsmpm
32%kylehat3
44%kyle#N/A

<tbody>
</tbody>

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)

Try this:

=SUMPRODUCT(--(C2:C6="andrew"),--ISTEXT(D2:D6),B2:B6,A2:A6)/SUMPRODUCT(--(C2:C6="andrew"),--ISTEXT(D2:D6),A2:A6)

Markmzz
 
Upvote 0

Forum statistics

Threads
1,216,084
Messages
6,128,722
Members
449,465
Latest member
TAKLAM

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