# CountIf()

#### pacoonejr

##### Board Regular
I guess I just don't get it. I want to count on F2:F200 IF B = "Y" and F = "Z". I think (emphasis on think) I have tried every concievable way to do this. Could someone please explain this to me.

### Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Help I received from this board
Code:
``=SUMPRODUCT(--(INDIRECT("'"&D\$1&"'!\$G\$3:\$G"&D\$8)="Pass"),--(ISNUMBER(MATCH(INDIRECT("'"&D\$1&"'!\$I\$3:\$I"&D\$8),{"Major","Maj"},0))))``
I counting passed in column G and major in column I.
HTH,
Bruce.

Are you looking in B1 and F1 or the Y and Z, respectively? Or are you looking in column B and Column F for occurrences of Y and Z?

pacoonejr said:
I guess I just don't get it. I want to count on F2:F200 IF B = "Y" and F = "Z". I think (emphasis on think) I have tried every concievable way to do this. Could someone please explain this to me.

Try --

=SUMPRODUCT(--(B2:B200="Y"),--(F2:F200="Z"),F2;F200)

for counting, use

=SUMPRODUCT(--(B2:B200="Y"),--(F2:F200="Z"))

SUMPRODUCT, FAR OUT! That did it. YIPEE!

Replies
1
Views
181
Replies
3
Views
109
Replies
6
Views
63
Replies
1
Views
46
Replies
6
Views
298

1,203,468
Messages
6,055,597
Members
444,800
Latest member
KarenTheManager

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