Tech Support > Computers & Technology > Programming > Experts HELP !!!
Experts HELP !!!
Posted by yang@netlook.com.br on February 24th, 2004


I need to write a short function in VBA or any excel funtion.

Problem:
On the Entrance examination of our high school we have 4 subjects and
we need to select the best student base on their average score.

E.g.
Subjt 1 | Subject 2| Subjt 3 | Subjt 4 | TOTAL
================================================
Max Score: 150 150 100 100 500

Student1 60 60 50 50 220
Student2 40 40 90 90 220

OBS: In this case we prefer Student1 rather than Student2, because of
the average of scores.

how can I write a function or macro in Excel to perform ranking of
the best student based on their average scores.

Any ideia or comment will be appreciated.

Thanks!!!

Posted by Richard Heathfield on February 24th, 2004


yang@netlook.com.br wrote:

Student 2 scored 260 (not 220), and has an average (arithmetic mean) score
of 65. Student 1's arithmetic mean is only 55.

I think you need to learn about averages before you try your hand at
programming.

--
Richard Heathfield : binary@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton

Posted by Joe \Nuke Me Xemu\ Foster on February 24th, 2004


"Richard Heathfield" <invalid@address.co.uk.invalid> wrote in message <news:403afda8@news2.power.net.uk>...

Student1 comes out looking better if you sum the squares of the points
missed on each exam:

Student1: (150-60)**2 + (150-60)**2 + (100-50)**2 + (100-50)**2 = 21200
Student2: (150-40)**2 + (150-40)**2 + (100-90)**2 + (100-90)**2 = 24400

--
Joe Foster <mailto:jlfoster%40znet.com> DC8s in Spaace: <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above They're coming to
because my cats have apparently learned to type. take me away, ha ha!



Posted by Michael Mendelsohn on February 24th, 2004


Joe \"Nuke Me Xemu\" Foster schrieb:
True, but that's a modified variance, not an avarage, isn't it?
Richard's comment still applies.

Michael
--
Feel the stare of my burning hamster and stop smoking!

Posted by Richard Heathfield on February 24th, 2004


Joe "Nuke Me Xemu" Foster wrote:

Let's try a geometric mean:

Student 1 comes out at 54.7723, and Student 2 at 60. Let's hear it for
Student 2!

--
Richard Heathfield : binary@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton

Posted by gswork on February 24th, 2004


yang@netlook.com.br (yang@netlook.com.br) wrote in message news:<d78e77ae.0402232325.67ef8acb@posting.google. com>...
Imagine that you placed the above in Excel, with 'Student 1' in cell
'A1'

the the total cell for student one would read =SUM(B1:E1), the average
can be placed next to that: =AVERAGE(B1:E1), these are standard excel
fucntions you should know about.

When you're done use Data -> sort and select the column where the
averages are.

If need be you can record a macro and adjust if need be, but i think
you'll benefit from getting the basics right first.

Really, you ought to just be able to do this kind of stuff, it's
really entry level spreadsheet usage. Perhaps recommend a course to
your boss and a good reference book about Excel, as marking up
students for selection is not just something that has to be
responsibly designed - it has to be implemented in a responsible way
too.

Posted by Michael Mendelsohn on February 24th, 2004


Richard Heathfield schrieb:
Converted into percentages, the students rate thus:
Student1 40% 40% 50% 50% avg 45%
Student2 27% 27% 90% 90% avg 58%

Excel at the easy problems, never mind the hard ones!
mendel
--
Feel the stare of my burning hamster and stop smoking!

Posted by yang on February 25th, 2004


Thanks a lot!!!!
Now, I know how to select the best students to our high school. :-)


Similar Posts