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.
- Apr 27, 2020=COUNTIF(1:1,"Pass")
The above formula will count all cells with a value of "Pass" in row 1 of the sheet.
Abiola1
Apr 27, 2020MVP
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"))
To count how many are pass, execute =COUNTIFS(A1:A100,"Pass").
You can also use =SUMPRODUCT(1*(A1:A100="Pass"))
Zack Barresse
Apr 27, 2020Iron Contributor
I 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.