Count cells based on multiple OR criteria

David627

New Member
Joined
Apr 13, 2009
Messages
14
I need to have multiple ranges count based on several criteria. The hitch is that needs to count if one or more criteria is met not all. I tried using a COUNTIFS however that seems to evaluate based on AND not OR.

Is there a nested COUNTIFS or similar function that would work?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
well this works. Thanks. A follow-up - what if I want to find one option or another that are unrelated. For example in the same column I want to count the number of times a range says BLUE and the number of times a range says RED - so if red shows up 2 times and blue 7 the answer should be 9. This is an OR statement as well
 
Upvote 0
the simplist would be to add two sumproducts together
Code:
<TABLE style="FONT-SIZE: 9pt; FONT-FAMILY: Arial" cellSpacing=0 cellPadding=2 border=1><TBODY><TR><TD>=SUMPRODUCT(--(A1:A6=627),--(B1:B6="a"),--(c1:c6="Blue"))
+SUMPRODUCT(--(A1:A6=627),--(B1:B6="a"),--(c1:c6="Red"))
</TD></TR></TBODY></TABLE>
 
Upvote 0
you are combining 2 separate questions - thisis a Separate formula: I only want to count the number of times a range says BLUE and the number of times a range says RED (nothing to do with 627 & a). Your answer would give me more 9 in my example above
 
Upvote 0
you are combining 2 separate questions - thisis a Separate formula: I only want to count the number of times a range says BLUE and the number of times a range says RED (nothing to do with 627 & a). Your answer would give me more 9 in my example above

Your post said it was a follow-up so was thinking it was still the same and I was trying to give you an example. :cool: So if it is a straight forward single type of count then countif would give you that??? Yes/No
 
Upvote 0
=countif(a1:a100,"Blue")+countif(a1:a100,"Red")

Excel Workbook
AB
2Total Blue/Red
3Blue4
4Red
5Blue
6Red
7Orange
8Pink
Data
 
Upvote 0
your welcome and another option
Excel Workbook
AB
2Total Blue/Red
3Blue4
4Red4
5Blue
6Red
7Orange
8Pink
9
Data
 
Upvote 0

Forum statistics

Threads
1,215,359
Messages
6,124,488
Members
449,165
Latest member
ChipDude83

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