simple two-dimensional array sort
Posted on 2003-11-11
This is giving me alot of trouble. I have an array with n elements. Each element has a NAME and a SCORE
I need to sort the array descending by score... so the student with the highest score is at the top. 50 is the max scores the class may have,but there maybe less, which is where n - 1 comes in as the number of scores actually found for a particular class. This is what I have to sort:
Dim rankArray(50, 1) As Variant
rankArray(0,0) = "Mike"
rankArray(0,1) = 10
rankArray(1,0) = "John"
rankArray(1,1) = 3
Then I have to report the top 5 scores which is the reason I'm trying to sort the array. Help! :-\