Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

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.

share|improve this question
add comment

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

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

2 Answers

up vote 6 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" ) )
share|improve this answer
    
The second formula is perfect, thanks. –  GG. Feb 2 '12 at 14:47
add comment

Use this excel formula:

Assuming Column A has list of entries

=(COUNTIF(A:A,"=OK")/COUNTA(A:A))*100
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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