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.

migrated from superuser.com Feb 2 '12 at 18:47

This question came from our site for computer enthusiasts and power users.

6

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" ) )
  • The second formula is perfect, thanks. – GG. Feb 2 '12 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, privacy policy and cookie policy

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