COUNTIF AND

Peter100

Well-known Member
Joined
Apr 21, 2002
Messages
765
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

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
On 2002-10-21 05:43, Peter100 wrote:
Hi

Andrew yours worked a treat

Aladin it still included the blanks

Many thanks to you all

Not so fast...

You mean when empty cells in both ranges...

OK, I goofed on that... However, you need to test both ranges for blanks and/or empty cells...

See...
aaMultCondCount Peter100.xls
ABCD
10RIGHT
2LEFT2
30LEFT2
40XSA
54XSA
63DRA
7 LEFT
8 
9
10
Sheet1
 
Upvote 0
Hi Again

I see your point about testing both ranges, but now Aladins example confuses me, surely there is only one occurence of 0 and LEFT
 
Upvote 0
On 2002-10-21 16:25, Peter100 wrote:
Hi Again

I see your point about testing both ranges, but now Aladins example confuses me, surely there is only one occurence of 0 and LEFT

Peter,

I thought we were counting co-occurrences of real 0's and non-LEFT's. There are 2 instances in the worksheet figure, colored in light yellow. Otherwise, either of:
=SUMPRODUCT((ISNUMBER(A1:A10))*(A1:A10=0)*(B1:B10="LEFT"))

=SUM(IF(ISNUMBER(A1:A10),(A1:A10=0)*(B1:B10="LEFT")))

would suffice.

Aladin
This message was edited by Aladin Akyurek on 2002-10-21 17:41
 
Upvote 0
On 2002-10-21 00:26, Peter100 wrote:
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 ?

{=COUNT(IF(A15:A74="YES",IF(G15:G74="YES",1)))}

Note: This is an array formula which must be entered using the Control+Shift+Enter key combination. The outermost braces, { }, are not entered by you -- they're supplied by Excel in recognition of a properly entered array formula. For more on array formulas see the Excel Help topic for "About array formulas and how to enter them".
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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
Back
Top