=COUNTIF(B2:B5,"PASS")/COUNTA(B2:B5)
Suppose you have 4 students
PASS
PASS
PASS
FAIL
The above formula will return .75 and if you format the cell as percentage
it will be 75%.
As a point of style for using worksheets, you should use indirect references
in formulas so they can be more flexible.
Type PASS into D1 then
=COUNTIF(B2:B5,D1)/COUNTA(B2:B5)
equals 75%
Type FAIL into D1 then it will equal 25%. In a two option list this is
unnecessary but if there were letter grades (A thru F) then you could use
the formula to show the percentage at each level.
(The countif function is not case sensitive, so all the pass and fails do
not need to be capitalized.)
Tom Turak
-----Original Message-----
From: Mick Fitzpatrick [mailto:[log in to unmask]]
Sent: Thursday, October 09, 2003 7:26 AM
To: [log in to unmask]
Subject: [PCSOFT] Excel 97 ... to show pass or fail as a percentage
Hello
First thing ... thank you for the info on showing a minus figure as a zero
... it is now working
I have another question please.
I have a spreadsheet of pupils showing when they pass or fail their driving
test. It is a basic sheet with their name in one column, next the date, then
next to that the word pass or fail as appropiate.
What I would like to do is have make some kinda calculation from the
'pass/fail column' and convert that into a percentage. In other words: If I
have had 10 pupils and 7 have passed and 3 have failed then one calculation
will be 70% and the other 30% (hopefully showing the percent symbol as
well). If it's not possible to calculate the words 'pass' or 'fail' I can
change those words to an appropiate number.
Is that possible?
I hope I have made myself clear ... I can put an example on the web if this
will help?
TIA ... Mick
The NOSPIN Group is now offering Free PC Tech
support at our newest website:
http://freepctech.com
The NOSPIN Group is now offering Free PC Tech
support at our newest website:
http://freepctech.com
|