# COUNTIF AND

#### Peter100

##### Well-known Member
I want to count two ranges a15:a74 and g15:g74 as long as the first range contains "YES" and the second range contains "YES"

can one combine multiple countif statements ?

### Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

#### Yogi Anand

##### MrExcel MVP
Hi Peter100:

You can use the following SUMPRODUCT formula

=SUMPRODUCT((A15:A74="Yes")*(G15:G74="Yes"))

Regards!

Yogi

#### Peter100

##### Well-known Member
Hi Yogi

I assume this has to be entered as an array ?

#### Peter100

##### Well-known Member
Hi Again

Aladins formula is great, but it appears to include any blank cells in the range
The actual criteria I'm evaluating is either
"LEFT" & 0

where I want to do acount of the range that includes zeros but not if the other range has a corresponding "LEFT"

#### Andrew Poulsom

##### MrExcel MVP
You can use ISNUMBER to exclude blank cells, like this:

=SUMPRODUCT((A15:A74=0)*ISNUMBER(A15:A74)*(G15:G74<>"LEFT"))

##### MrExcel MVP
On 2002-10-21 03:29, Peter100 wrote:
Hi Again

Aladins formula is great, but it appears to include any blank cells in the range
The actual criteria I'm evaluating is either
"LEFT" & 0

where I want to do acount of the range that includes zeros but not if the other range has a corresponding "LEFT"

Peter,

I'm a bit lost...

Are you saying that you want to count the co-occurrences of a real 0 in one range and anything else but the word LEFT in other range?

#### Peter100

yes

##### MrExcel MVP
On 2002-10-21 05:19, Peter100 wrote:

yes

=SUMPRODUCT((A1:A6=0)*(B1:B6<>"LEFT"))

#### Andrew Poulsom

##### MrExcel MVP
Does that allow for blank cells in the range A1:A6?

See my posting.

Replies
2
Views
183
Replies
1
Views
75
Replies
9
Views
148
Replies
2
Views
170
Replies
4
Views
147

1,181,534
Messages
5,930,460
Members
436,740
Latest member
Ogidi

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