Forum Discussion
Frank145
Jan 26, 2023Brass Contributor
COUNTIF with Criteria
Hi I am trying to count how many rows in the "C" column with different criteria that are listed in "P" column and set as "Wave-4". The criteria in "C" are Sybase","MariaDB","MongoDB","Oracle","...
ecovonrein
Jan 26, 2023Iron Contributor
You answered your own question. If you want This AND That, you must repeat the criteria_range for every criteria. Which is tiring. You can attack it with LET, as in
=LET(planList;PlanningList!$C$2:$C$1792;COUNTIFS(planList,"Sybase",planList,"MariaDB", ...
That's as good as it gets, I suppose. If you want This OR That, it gets harder. You could go via FILTER in both cases, is in
=LET(planList;PlanningList!$C$2:$C$1792;COUNT(FILTER(planList;(planList="Sybase) + (planList="MariaDB") + ...
Knock yourself out. Use + for OR and * for And.
=LET(planList;PlanningList!$C$2:$C$1792;COUNTIFS(planList,"Sybase",planList,"MariaDB", ...
That's as good as it gets, I suppose. If you want This OR That, it gets harder. You could go via FILTER in both cases, is in
=LET(planList;PlanningList!$C$2:$C$1792;COUNT(FILTER(planList;(planList="Sybase) + (planList="MariaDB") + ...
Knock yourself out. Use + for OR and * for And.
- Frank145Jan 26, 2023Brass ContributorThank you for your responses. The other solution allowed me to use the same function, so I went with that.
Thanks again.