Sub 筛选最高分项()
Set endrng = Cells(2, Cells.Find("总分", lookat:=xlWhole))
Set t = Application.WorksheetFunction.CountA(Sheets("Sheet1 (2)").Columns(1))
Set r = Range(Cells(2, endrng), Cells(t, endrng))
maxx = Application.WorksheetFunction.Max(r)
For pos = 2 To Total
If Cells(pos, c).Value < maxm Then
Rows(pos).Select
End If
Next
End Sub
目的是删除最高分以外的其他行数
思路是目的是查出总分所在的列数,然后从第二列开始遍历每一行,删除列数低于最高值的。
有大神能帮忙看看吗
Set endrng = Cells(2, Cells.Find("总分", lookat:=xlWhole))
Set t = Application.WorksheetFunction.CountA(Sheets("Sheet1 (2)").Columns(1))
Set r = Range(Cells(2, endrng), Cells(t, endrng))
maxx = Application.WorksheetFunction.Max(r)
For pos = 2 To Total
If Cells(pos, c).Value < maxm Then
Rows(pos).Select
End If
Next
End Sub
目的是删除最高分以外的其他行数
思路是目的是查出总分所在的列数,然后从第二列开始遍历每一行,删除列数低于最高值的。
有大神能帮忙看看吗