With Tables("教师成绩表") .Sort = "教师总评 Desc" .Rows(0)("教师排名") = 1 For i As integer = 1 To .Rows.Count -1 If .Rows(i)("教师总评") = .Rows(i - 1)("教师总评") Then .Rows(i)("教师排名") = .Rows(i - 1)("教师排名") Else .Rows(i)("教师排名") = .Rows(i - 1)("教师排名") + 1 End If If i Mod 100 = 0 Then e.form.Controls("ProgressBar1").Value = i * 100 \ (.rows.Count -1) End If Next End With