# Using Countif or other with two conditions

#### maic15

##### Active Member
Below, is a countif() that I'm using to summarize my data on "Summary 2" worksheet.

=COUNTIF('MA, SY and PL Tracking'!\$A\$10:\$A\$146,"G")

I need to add another condition to this statement, but do not know how to join two Countif() statements.

Here is the other statement:

=COUNTIF('MA, SY and PL Tracking'!S10:S145,"X")

### Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Below, is a countif() that I'm using to summarize my data on "Summary 2" worksheet.

=COUNTIF('MA, SY and PL Tracking'!\$A\$10:\$A\$146,"G")

I need to add another condition to this statement, but do not know how to join two Countif() statements.

Here is the other statement:

=COUNTIF('MA, SY and PL Tracking'!S10:S145,"X")

You omitted to stipulate the way you need them to "join". Likely...

=SUMPRODUCT(--('MA, SY and PL Tracking'!\$A\$10:\$A\$146,"G"),--('MA, SY and PL Tracking'!S10:S146,"X"))

At Edit:

=SUMPRODUCT(--('MA, SY and PL Tracking'!\$A\$10:\$A\$146="G"),--('MA, SY and PL Tracking'!S10:S146="X"))

Good evening maic15

Download and install my add-in via the link below. Once installed, select Ultimate > Formulae > Multiple SumIf Generator. This will enable you to build a formula using SumProduct that will count the cells based on criteria of your choosing.

HTH

DominicB

I tried both options above and I'm getting a #value error? WHat am I doing wrong?

I tried both options above and I'm getting a #value error? WHat am I doing wrong?

Care to post the formula you're using? The ranges must be of the same size.

I solved the problem. If the ranges contain no data, then #value will occur.

Thanks!

This tools is very slick!

I solved the problem. If the ranges contain no data, then #value will occur.

No data in the ranges should not return an error.

I solved the problem. If the ranges contain no data, then #value will occur.

Thanks!

This tools is very slick!

=SUMPRODUCT(--('MA, SY and PL Tracking'!\$A\$10:\$A\$146="G"),--('MA, SY and PL Tracking'!S10:S146="X"))

Replies
16
Views
265
Replies
0
Views
153
Replies
4
Views
368
Replies
1
Views
260
Replies
1
Views
361

### Forum statistics

1,207,197
Messages
6,077,016
Members
446,250
Latest member
Dontcomehereoften

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