# SUMPRODUCT

#### Miss Hollywood

##### New Member
I have been working on the following and need a little help.

I have col A and Co B. I would like to have a formula that tells me how many rows the combo 1&5 or 2&5 occurs. I got the 1&5 to work earlier (but its on my work computer) but I could not get the "OR" part to work.

I believe I had a sumproduct formula with --

Answer for below would be 4
A B
1 5
2 5
3 7
4 8
5 9
1 5
2 5
3 7
4 8
5 9

If someone could help that would be most wonderful!

### Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the \$ sign).
Hi Miss Hollywood, try

=SUMPRODUCT(((A2:A11=1)+(A2:A11=2))*(B2:B11=5))

Denis

Or,

=SUMPRODUCT(--(ISNUMBER(MATCH(A1:A10,{1,2},0))),--(B1:B10=5))
Book1
ABCD
11514
22524
337
448
559
615
725
837
948
1059
Sheet1

Replies
10
Views
322
Replies
9
Views
256
Replies
5
Views
381
Replies
2
Views
116
Replies
4
Views
427

1,219,905
Messages
6,150,903
Members
450,991
Latest member
ExcelDoer

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