# Sumproduct Combined with Min function

#### Mooping

##### New Member
Hi all, I have two columns as follows

A B
40 0.5
35 0.2
60 1.25
70 2.00

And would like to Sumproduct the two but constraining the maximum value in column B to 1. Having a separate column that picks up the Min(B,1) is not practical as in practice I have a large number of B type columns.

My first attempt at a solution was
=+SUMPRODUCT(\$E9:\$E1390,(MIN(D9:D1390,1)))
but it returns an error.

### Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Try...

=SUMPRODUCT(A1:A4,B1:B4,--(B1:B4<=1))

Hi all, I have two columns as follows

A B
40 0.5
35 0.2
60 1.25
70 2.00

And would like to Sumproduct the two but constraining the maximum value in column B to 1. Having a separate column that picks up the Min(B,1) is not practical as in practice I have a large number of B type columns.

My first attempt at a solution was
=+SUMPRODUCT(\$E9:\$E1390,(MIN(D9:D1390,1)))
but it returns an error.

Hi and welcome to the board!!
Code:
``=SUM(IF(B1:B4<=1,A1:A4))``
This is an array formula, so you must confirm it by using CTRL+SHIFT+ENTER

lenze

Thanks for the warm welcome and quick suggestions - it strikes me that the proposed answers will only sumproduct if the value in column B is less than 1 and ignores values of column B that are greater than 1 -I'm looking for a solution that takes the value in column B if this is less than 1 and uses 1 if it's greater than 1. Any thoughts?

Thank you very very much!

Actually, no, you are right. This seems to work like a charm.

Thanks a lot!

Hi and welcome to the board!!
Code:
``=SUM(IF(B1:B4<=1,A1:A4))``
This is an array formula, so you must confirm it by using CTRL+SHIFT+ENTER

lenze

Actually, no, you are right. This seems to work like a charm.

Thanks a lot!

If so, a simpler and afster formula would be:

=SUMIF(B1:B4,"<=1",A1:A4)

Replies
18
Views
533
Replies
3
Views
332
Replies
4
Views
362
Replies
7
Views
351
Replies
1
Views
290

1,216,485
Messages
6,130,938
Members
449,608
Latest member
jacobmudombe

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