只要弄之前清空名次值不就行了?
Tables("表A").sort="成绩 DESC"
DataTables("表A").ReplaceFor("名次", Nothing)
Dim mc As Integer=1
Dim count As Integer=IIF(Tables("表A").Rows.count-1<8,Tables("表A").Rows.count-1,7)
For i As Integer=0 To count
If i>0 AndAlso Tables("表A").Rows(i)("成绩") <> Tables("表A").Rows(i-1)("成绩") Then
mc=mc+1
End If
Tables("表A").Rows(i)("名次")=mc
Next
Tables("表A").Filter="名次 is not null"