Forum Discussion
SUM plus countifs
- Jul 13, 2022Your 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.
- ajaydeshmukhJul 13, 2022Copper ContributorHello, can you please help how to add countifs for yes or no or true or false- Martin_WeissJul 13, 2022Bronze ContributorHi 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
 
 
- ajaydeshmukhJul 13, 2022Copper Contributorformula used - =SUM(COUNTIFS(A1:A12,{"<=13",">=17"})) 1. Why is it showing result 9, but not 7? 2. I want to have filter in B column stating if values in rows are following the criterion of formula in c1 or not? eg all 13, 14, 17 could have yes or true in next cell. rest all would be no or false thanks - Riny_van_EekelenJul 13, 2022Platinum ContributorYour 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. - ajaydeshmukhJul 13, 2022Copper ContributorThankyou, solved for the 1st doubt