Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello:
I have been creating a reporting tool, and would like to be able to sort from a macro using criteria pulled from a cell. How do I tell Excel to select the Sort Key based on data in another cell/worksheet. Right now, the script tells it to sort the range by column B, starting in row 3, ascending order. I'd like to have a drop down list of the "Fields" aka columns, in another worksheet. The user selects the field, clicks a button and Excel generates a report. This will be part of another macro that filters out records and copies them into a report template. Range("A1:AC23").Sort Key1:=Range("B3"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Hopefully this is clear. Steven |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Macro- sort issue in Excel2003 | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Using Macro to sort without clicking on macro button | Excel Discussion (Misc queries) | |||
Sort Macro | Excel Discussion (Misc queries) | |||
Sort Macro | New Users to Excel |