How do I create a formula for summing the product of cells, based on their value? [duplicate]

Below should work

=SUMPRODUCT((A2:A6)*(B2:B6)*(B2:B6>1))

Use the FILTER() function, using the 2nd column as the test.

=SUM(FILTER(A1:A5*B1:B5,B1:B5>1))

enter image description here


I found another solution that I have somehow missed before

=SUMPRODUCT( --(B1:B9 > 1), A1:A9, B1:B9)