Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello guys,
Just one quick question concerning "Sort" macro... I have the following code: Sub SortAscending() Range("A1:A10000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _ "E1"), Unique:=True Range("E1:E10000").Select Selection.SpecialCells(xlCellTypeBlanks).Delete (xlShiftUp) Range("E1:E10000").Sort Key1:=ActiveCell, Order1:=xlAscending, Header:= _ xlYes End Sub What I would like to do is to give the user the opportunity to choose/adapt input and output columns, f. ex. with small window apprearing and asking: Input column? ... Output column? ... Is it something easy to do? Do you have other (better) ideas how to achieve this? Many thanks, Mark |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try
Set rng = application.,Inputbox("Use the mouse to select a column", Type:=8) If not rng Is Nothing then inputcol = rng.Column End If -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "markx" wrote in message ... Hello guys, Just one quick question concerning "Sort" macro... I have the following code: Sub SortAscending() Range("A1:A10000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _ "E1"), Unique:=True Range("E1:E10000").Select Selection.SpecialCells(xlCellTypeBlanks).Delete (xlShiftUp) Range("E1:E10000").Sort Key1:=ActiveCell, Order1:=xlAscending, Header:= _ xlYes End Sub What I would like to do is to give the user the opportunity to choose/adapt input and output columns, f. ex. with small window apprearing and asking: Input column? ... Output column? ... Is it something easy to do? Do you have other (better) ideas how to achieve this? Many thanks, Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Missing sort ascending or descending when go into "data" "sort"? | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Customizing "blank workbook" | Setting up and Configuration of Excel | |||
pictures to work with "data" "sort" option | Excel Discussion (Misc queries) | |||
can I sort using column headings, in a macro, not "a1" | Excel Programming |