![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 2
|
Hi,
I am a teaching assistant, and my professor changed the grading policy. Previously, from a row of quizzes I was to drop the lowest one like so: (SUM()-MIN())/(COUNT()-1). Now I need to drop the lowest TWO! Can anyone help me write a function, or maybe a macro, that can accomplish this? I am trying to avoid sorting and selecting row, because that is manual and I have over 100 students. Thank you so much!!!! |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Guderup, Denmark
Posts: 287
|
Hi
here is a solution using small() =(SUM(ref)-Small(ref,1)-small(ref,2))/(count(ref)-2) regards Tommy |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Southfield,MI USA
Posts: 1,030
|
Hey,
The SMALL function will give you the Nth smallest value in a range. so you could likely use something like: =(SUM(A2:A20)-MIN(A2:A20)-SMALL(A2:A20,2))/(COUNTA(A2:A20)-2) ->assuming A2:A20 contains your quiz scores (tweak where applicable). Adam |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Southfield,MI USA
Posts: 1,030
|
ya beat me to the draw, Tommy!
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Location: Guderup, Denmark
Posts: 287
|
Yes Asala, but your explanation was also better/longer than mine
regards Tommy |
|
|
|
|
|
#6 |
|
New Member
Join Date: Apr 2002
Posts: 2
|
OH WOW! THANK YOU SO MUCH! IT WORKS PERFECTLY!!!!!!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|