Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
macro to sort right to left
Help please!
I need a macro to sort numbers left-to-right in cells C2 to G2 these numbers continue down the columns for about 600 I can't get the macro I need to move down a sort each row in turn. Thanks in advance Steve |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
macro to sort right to left
Steve,
You may need to change xlAscending to xlDescending: Sub SteveSort() Dim myC As Range For Each myC In Range(Range("C2"), Cells(Rows.Count, 3).End(xlUp)) myC.Resize(1, 5).Sort Key1:=myC, _ Order1:=xlAscending, Orientation:=xlLeftToRight Next myC End Dub HTH, Bernie MS Excel MVP "Steve" wrote in message ... Help please! I need a macro to sort numbers left-to-right in cells C2 to G2 these numbers continue down the columns for about 600 I can't get the macro I need to move down a sort each row in turn. Thanks in advance Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SORT BY: left to right | Excel Worksheet Functions | |||
Macro to sort numeric rows left to right | Excel Discussion (Misc queries) | |||
Sort Left-Right & Up-Down | Excel Worksheet Functions | |||
SORT RIGHT-TO-LEFT IN EXCEL | Excel Worksheet Functions | |||
Sort Left to Right | Excel Discussion (Misc queries) |