Forum Discussion
KattSwann
Apr 27, 2020Copper Contributor
Counting "Pass" in a row in
How do I write a formula that can count how many times the word "Pass" comes up in a row of data? Thanks in advance.
- =COUNTIF(1:1,"Pass")
The above formula will count all cells with a value of "Pass" in row 1 of the sheet.
5 Replies
Sort By
- Zack BarresseIron Contributor=COUNTIF(1:1,"Pass")
The above formula will count all cells with a value of "Pass" in row 1 of the sheet.- KattSwannCopper Contributor
Thank you! Zack Barresse
- Assuming you have Pass and Fail in columns A1:A100.
To count how many are pass, execute =COUNTIFS(A1:A100,"Pass").
You can also use =SUMPRODUCT(1*(A1:A100="Pass"))- Zack BarresseIron ContributorI posted a solution for a row of data as that is what the OP asked for, not a column. But yes, it can of course be any range. I certainly wouldn't use a more expensive SUMPRODUCT if a COUNTIF would work, but always nice to show options I guess.