Forum Discussion
ajaydeshmukh
Jul 13, 2022Copper Contributor
SUM plus countifs
Hello, I hope everyone is doing fine. I have used SUM + COUNTIFS together with range. I have got the result but I want to add yes/no or true/false in front of every row to to represent data o...
- 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.
ajaydeshmukh
Jul 13, 2022Copper Contributor
Hello, can you please help how to add countifs for yes or no or true or false
Martin_Weiss
Jul 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.
- ajaydeshmukhJul 14, 2022Copper ContributorOh, then that's not what i want.
I want to see results of =COUNTIFS(A1:A12,">=13",A1:A12,"<=17") for individual row.
Eg if i can add countif or a filter to indicate yes/true infront of every number which is '>=13' or '<=17' & no infront of the rest.
- 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.