# Sumproduct question

#### bab01824

##### Board Regular
I use sumproduct often in the form;

Code:
``SUMPRODUCT((RESULT="Y")*(MODULE="Fax")*(BETA="Y))``
, where RESULT, MODULE and BETA are column ranges and I am looking for a count where all three criteria are met.

But now I have to count incidences where the RESULT could be "Y" OR "B" in addition to the other criteria. Other than a long formula like;

Code:
``SUMPRODUCT((RESULT="Y")*(MODULE="Fax")*(BETA="Y))+SUMPRODUCT((RESULT="B")*(MODULE="Fax")*(BETA="Y))``

is there a simpler way?

bb

### Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

#### Zack Barresse

##### MrExcel MVP
how about...

=SUMPRODUCT(or((RESULT="Y"),(RESULT="B"))*(MODULE="Fax")*(BETA="Y))

#### Joe4

##### MrExcel MVP, Junior Admin
Try this:

=SUMPRODUCT((RESULT={"Y","B"})*(MODULE="Fax")*(BETA="Y"))

#### Aladin Akyurek

##### MrExcel MVP
Three options: In order of flexibilty and speed...

=SUMPRODUCT(--ISNUMBER(MATCH(RESULT,{"Y","B"},0)),--(MODULE="Fax"),--(BETA="Y"))

=SUMPRODUCT(((RESULT="Y")+(RESULT="B")),--(MODULE="Fax"),--(BETA="Y"))

=SUMPRODUCT((RESULT={"Y","B"})*(MODULE="Fax")*(BETA="Y"))

#### Aladin Akyurek

##### MrExcel MVP
firefytr said:
how about...

=SUMPRODUCT(or((RESULT="Y"),(RESULT="B"))*(MODULE="Fax")*(BETA="Y))

OR computes a scalar value, not an array, hence it won't work.

#### Zack Barresse

##### MrExcel MVP
thank you Aladin,

i got to looking at that, and now see my folly. sorry bout the mis-post. fingers ahead of the mind

thank you for the correction!

i apologize bruce, didn't mean to screw up your post.

#### bab01824

##### Board Regular
I had tried the OR and it didn't work. The { } solution worked,

Thanks as always.

bb

#### Aladin Akyurek

##### MrExcel MVP
bab01824 said:
... The { } solution worked...

That's not too specific, is it?

Replies
4
Views
702
Replies
2
Views
677
Replies
13
Views
1K
Replies
2
Views
613
Replies
8
Views
772

### Forum statistics

Threads
1,171,535
Messages
5,876,072
Members
433,172
Latest member
Mohamed Hamada 22

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

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