# Sumproduct - multiple conditions

#### petrcz

##### New Member
Hi guys,

pleae, can you give me a hint, how to proceed sumproduct with multiple conditions?

I have this table

 Month Average position Impressions 2015|11 0 1000 2015|12 1 2000 2016|01 2 1500

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

I need this: if value in column Month equals to "2015|11" and a value in the column "average position" is greater than 0, then use that data

Thank you in advance for any help...

RP

### Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Use the following formula

=LOOKUP(2,1/(A2:A100="2015|11")/(B2:B100=0),(C2:C100))

This will return the matching value from column C

Thanks, but I need to calculate weightened average.
What is the average position (weightened average) regard to the number of impressions in a specific month?
PR
****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">weighted average</body>

I don't completely understand what you mean, can you give an example with the desired output?

Anyhow, I guess you need something similar to this?: =SUMPRODUCT(--(A2:A4="2015|11")*--(B2:B4>0)*C2:C4)

Perhaps:

=SUMPRODUCT(B2:B10,C2:C10,--(A2:A10="2015|11"))/SUMIF(A2:A10,"2015|11",B2:B10)

OK, what is the weightened average of average position?
I need to calculate weightened average for month 2015|11 and for non "null" position. So, in this case, bold values should be ignored, because they are either "null" or are from different month..
The result of sample below is 1,66

 Month Average position Impressions 2015|11 0 1000 2015|11 1 2000 2015|11 2 4000 2015|12 1 2000 2016|01 2 1500

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

Thank you
PR

Replies
8
Views
181
Replies
2
Views
371
Replies
3
Views
2K
Replies
5
Views
135
Replies
7
Views
123

1,203,465
Messages
6,055,579
Members
444,799
Latest member
CraigCrowhurst

### 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.

### Which adblocker are you using?

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

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