4

I have a column in my Google Spreadsheet which contains either OK or NOK (acceptance testing).

How can I calculate the percentage for how often OK appears compared to NOK.

2 Answers 2

7

How about:

= COUNTIF( A1:A; "OK" ) / COUNTA( A1:A )

A1:A defining the column in which the OK/NOK values are defined. If you have more values than OK and NOK, use this:

= COUNTIF( A1:A; "OK" ) / ( COUNTIF( A1:A; "OK" ) + COUNTIF( A1:A; "NOK" ) )
1
  • The second formula is perfect, thanks.
    – GG.
    Feb 2, 2012 at 14:47
2

Use this excel formula:

Assuming Column A has list of entries

=(COUNTIF(A:A,"=OK")/COUNTA(A:A))*100

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.