![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 38
|
i need a macro that will bring up the 'Top 10 auto filter' input box
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
The following line will sort on column M (13th field from A1) and bring up the top 10
Range("A1").AutoFilter Field:=13, Criteria1:="10", Operator:=xlTop10Items Change the criteria to whatever you want, or have it as a variable (a cell value or an input box, for example). MyVar = InputBox("Enter top ## of items to display") Range("A1").AutoFilter Field:=13, Criteria1:=MyVar, Operator:=xlTop10Items HTH, Jay |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|