Excel进行分组

我有一个excel,其中第一列包含1.1,1.2,1.3等学生的卷号,第二列包含他们在每个学期30 40 60的分数。 我想知道每个学生得分最高分只有我的优秀。 我有几乎1000名学生。 以下是格式。 想要添加,我想要使用Perl脚本语言来做到这一点

Students Marks Obtained 1.1 45 1.1 68 1.1 69 1.2 70 1.2 14 1.2 48 . . . 9.9 87 9.9 76 9.9 66 9.9 100 

此代码从C16开始:

 Dim StartX As Integer Dim StartY As Integer Dim i As Integer Dim TmpS As String Dim TmpI As Integer StartX = 16 StartY = 3 TmpS = "" TmpI = 0 For i = StartX To 9999 If Cells(i, StartY).Value = "" Then Exit For If TmpS <> Cells(i, StartY).Value Then If i <> StartX Then Cells(i - 1, StartY + 2).Value = TmpI TmpI = Cells(i, StartY + 1).Value End If Else If TmpI < Cells(i, StartY + 1).Value Then TmpI = Cells(i, StartY + 1).Value End If TmpS = Cells(i, StartY).Value Next Cells(i - 1, StartY + 2).Value = TmpI 

阅读所有的细胞,并写在每个学生附近的最大速度
如果你喜欢,你可以放在一个数组或写在另一个表…