Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am trying to sort a variable range with a static first cell ("A4"). How do
I use a variable reference to the end range in the sort statement? Here is what I am trying to use but it gives me a syntax error. wsPh.Application.Goto Reference:="R4C1" wsPh.Range("a4:("r" & EMcnt)").Select .Selection.Sort Key1:=Range("I4"), Order1:=xlAscending, Key2:=Range("R4") _ , Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _ False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _ :=xlSortNormal |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I sort between worksheets depending on variable | Excel Worksheet Functions | |||
Variable Column Sort | New Users to Excel | |||
How do I use a variable in a sort macro | Excel Worksheet Functions | |||
Automatic Sort for variable Ranges | Excel Worksheet Functions | |||
Sort : how can I use a variable in a VB sort function? | Excel Worksheet Functions |