This Excel macro filters a set of data in Excel to display only the top 10 percent of that data set. This means that the highest 10 percent of the data set, as filtered by whatever column you choose, is all that will appear after the filter is applied. This macro uses the autofilter feature in Excel and is a great way to view subsets of your data in order to better analyze that data.
To use this macro you only have to change the range and field references to match the references of your data set or table in Excel. This is a very easy macro to use and apply in Excel.
All of the elements below often appear within autofilter macros.
Range
Field
Criteria
Operator
Sub AutoFilter_Top_10_Percent()
Range("A1").AutoFilter Field:=5, Criteria1:="10", Operator:=xlTop10Percent
End Sub