Forum Discussion
COUNTIF formula to exclusively count when all criterias are listed.
Hi there. I've been trying to create a formula where it counts the amount of times a row contains ALL the criteria i have set out, and not just count when at least 1 of the criteria is counted.
I created an excel spreadsheet for you to try and create a COUNTIF formula that answers the formula prompt but my organisation doesn't allow me to share to anyone. Hopefully this screenshot gives you an idea of what i'm after. Please get back to me if
Thank you kindly!
MontyKnoll Try this:
=SUM(COUNTIFS(C2:C26,"Group",B2:B26,{"Cold","Room Temp"}))
or use a pivot table.
- Riny_van_EekelenPlatinum Contributor
MontyKnoll Try this:
=SUM(COUNTIFS(C2:C26,"Group",B2:B26,{"Cold","Room Temp"}))
or use a pivot table.
- MontyKnollCopper Contributor
Nevermind. Your formula worked perfectly in my pretend yoga spreadsheet but for my actual spreadsheet not so much. Formula comes up with 0 everytime and there are red brackets in my formula. Could you let me know what i'm doing wrong?
Thank you so much.
- Riny_van_EekelenPlatinum Contributor
Can't tell without seeing the workbook. Sorry. Are you sure that everything is spelled correctly? Leading or trailing spaces may mess up things pretty badly.
- MontyKnollCopper ContributorIt works! I knew there had to be a way. Thank you