SUMPRODUCT

Miss Hollywood

New Member
Joined
Dec 18, 2005
Messages
3
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

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

SydneyGeek

MrExcel MVP
Joined
Aug 5, 2003
Messages
12,251
Hi Miss Hollywood, try

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

Denis
 

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
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
 

Forum statistics

Threads
1,176,070
Messages
5,901,200
Members
434,882
Latest member
tchien69

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
Top