Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following does 4 columns and assumes the same number of rows in
each column. You can easily modify it to suit. Sub Macro1() Dim iEnd As Integer Dim ws As Worksheet Set ws = Sheets("Sheet1") iEnd = ws.Range("A1").End(xlDown).Row For iCol = 1 To 4 ws.Range(Cells(1, iCol), Cells(iEnd, iCol)).Sort Key1:=Cells(2, iCol), _ Order1:=xlAscending, Header:=xlGuess, OrderCustom:=1, _ MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Next iCol End Sub Hth, Merjet |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple columns into single row | Excel Discussion (Misc queries) | |||
move multiple columns into single set of columns | Excel Discussion (Misc queries) | |||
removing single quotes from a paste operation | Excel Programming | |||
SUMIF with multiple criteria for multiple columns to sum a single | Excel Programming | |||
How do I lock columns together in a single row for sorting purpos. | Excel Discussion (Misc queries) |