admin管理员组

文章数量:1313347

I have a sheet below. I want to filter the top 5 in class 2310. But only get 3 rows of data. I cannot figure out what's wrong, just need help. What's the problem and how to solve it?

Sub test()
    Dim filterRng As Range
    AutoFilterMode = False
    filterRng.AutoFilter field:=1, Criteria1:=2310
    filterRng.AutoFilter field:=3, Criteria1:=5, Operator:=xlTop10Items
End Sub

I expect five rows of data with higest scores, but only get three. just confused me

本文标签: excelConfusion on autofilter() function in vbaStack Overflow