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

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

link|improve this question
feedback

migrated from superuser.com Feb 2 at 18:47

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

2 Answers

up vote 4 down vote accepted

How about:

= COUNTIF( A1:A100; "OK" ) / COUNT( A1:A100 )

A1:A100 being your range in which the OK/NOK values are defined. If you have more values than OK and NOK, use this:

= COUNTIF( A1:A100; "OK" ) / ( COUNTIF( A1:A100; "OK" ) + COUNTIF( A1:A100; "NOK" ) )
link|improve this answer
The second formula is perfect, thanks. – GG. Feb 2 at 14:47
feedback

Use this excel formula:

Assuming Column A has list of entries

=(COUNTIF(A:A,"=OK")/COUNTA(A:A))*100
link|improve this answer
feedback

Your Answer

 
or
required, but never shown