Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]() i have some code which sorts a league table, firstly by column n (pts), then if pts are equal - column m (goal diff) Code: -------------------- Range("A19:N38").Select Range("N19").Activate Selection.sort Key1:=Range("N20"), Order1:=xlDescending, Key2:=Range( _ "M20"), Order2:=xlDescending, Header:=xlGuess, OrderCustom:=1, MatchCase _ :=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, _ DataOption2:=xlSortNormal -------------------- if the values in column m are equal how do i then do an extra sort based on - columnf + columnk (goals scored) -- cjsmith22 ------------------------------------------------------------------------ cjsmith22's Profile: http://www.excelforum.com/member.php...o&userid=28528 View this thread: http://www.excelforum.com/showthread...hreadid=484654 |
#2
![]() |
|||
|
|||
![]()
cjsmith22,
1. check that the last column of the worksheet is blank. 2. insert a column at Column O 3. enter the result of column F + Column K in the new Column O 4. sort on range A:19:O38 using O20 as Key3 5. delete Column O Jim Cone San Francisco, USA "cjsmith22" wrote... i have some code which sorts a league table, firstly by column n (pts), then if pts are equal - column m (goal diff) Code: -------------------- Range("A19:N38").Select Range("N19").Activate Selection.sort Key1:=Range("N20"), Order1:=xlDescending, Key2:=Range( _ "M20"), Order2:=xlDescending, Header:=xlGuess, OrderCustom:=1, MatchCase _ :=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, _ DataOption2:=xlSortNormal -------------------- if the values in column m are equal how do i then do an extra sort based on - columnf + columnk (goals scored) -- cjsmith22 |
#3
![]() |
|||
|
|||
![]() cheers Jim ! -- cjsmith22 ------------------------------------------------------------------------ cjsmith22's Profile: http://www.excelforum.com/member.php...o&userid=28528 View this thread: http://www.excelforum.com/showthread...hreadid=484654 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find dates in a range; then sum values in that range by a criteria | Excel Discussion (Misc queries) | |||
Sorting a range of cells that get value from other cells | Excel Discussion (Misc queries) | |||
Counting empty cells within a range of cells | New Users to Excel | |||
can a formula check for a certain value in a range? | Excel Discussion (Misc queries) | |||
Counting empty cells within a range of cells | New Users to Excel |