How to calculate pass/fail percentages entered on a spreadsheet?

J

Jenna

I am trying to set up a spreadsheet with driving test results including one
column to say pass one to say fail and calculate the percentage of each on a
monthly basis. I can enter the info but don't know how to calculate the
percentages
 
V

VBA Noob

Hi

I've just assumed the pass and fails are in Col A.


I then put this formula in B1 to Count the number of passes and divid
by the number of Pass or Fails

=SUMPRODUCT(--($A$1:$A$1000="*pass*"))/COUNTA(A:A)

Same formula to find Fails

=SUMPRODUCT(--($A$1:$A$1000="*fail*"))/COUNTA(A:A)

Then Format cells as %

VBA Noo
 
D

Dave Peterson

I don't think that wild cards will work like that.

But if Pass (or Fail) is the only word in the cell:
=SUMPRODUCT(--($A$1:$A$1000="fail"))/COUNTA(A:A)
will work ok.

And if pass and fail are included in longer strings:

=SUMPRODUCT(--ISNUMBER(SEARCH("fail",$A$1:$A$1000)))/COUNTA(A:A)

will look within each cell.

(Similar formulas for Pass.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top