Macro to filter and display only top 5 records on last sheet

S

sunilkeswani

Hi

I have a dump of records on excel that will look like this.

Class VOL.
Access 25
Excel 20
Word 50
Outlook 10

I want a macro to automatically pull out the records with top5 volumes
from a large range, and paste it in descending order on a specific
worksheet which is pre-formatted.

Desired Result:

Class VOL
Word 50
Access 25
Excel 20
Outlook 10

Please advise on how I can do this.

Cheers!
Sunny
 
E

Earl Kiosterud

Sunny,

One approach would be to sort the table (or a copy, if you want to keep the
table in its original order, and can't resort it) in descending order. Then
copy/paste the first 5 rows to the destination. The macro recorder will
probably do all of this without requiring code modification.

Earl Kiosterud
www.smokeylake.com
 
Top