Forum Discussion
SUM plus countifs
- Jul 13, 2022
Your formula counts all numbers <=13, being 4
plus
the count of all numbers >= 17, being 5.
Thus, 9
Putting the criteria in curly brackets forces an OR rather than the AND type of function you need. Count all number >= 13 AND <= 17.
Try it this way:
=COUNTIFS(A1:A12,">=13",A1:A12,"<=17") resulting in 7.
Hi ajaydeshmukh
could you please post an example of your file, what it should look like? This makes it easier for us to give proper advise.
Generally spoken, you could use more criteria in COUNTIFS. So it would be possible, to add one criteria to count yes/no or true/false.
- Martin_WeissJul 13, 2022Bronze Contributor
Hi ajaydeshmukh
I take Riny_van_Eekelen proposal as a base. You just need to add another criteria range + criteria.
=SUM(COUNTIFS(A1:A12,">=13",A1:A12,"<=17",B1:B12,"yes"))
- ajaydeshmukhJul 14, 2022Copper Contributor
- Riny_van_EekelenJul 14, 2022Platinum Contributor
ajaydeshmukh But B1:B12 is empty, so COUNTIF doesn't find "Yes" anywhere.
- SergeiBaklanJul 13, 2022Diamond Contributor
Why with SUM ?
- Martin_WeissJul 13, 2022Bronze Contributor
Hi SergeiBaklan
you are right, SUM is not necessary at all in this case. I just kept it because it was part of the initial formula that was posted.