Thanks guys code as below works as far as it goes:-
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 6 Then Exit Sub
gcol = 7: ncol = 14: ocol = 15: lcol = 12
If Not Intersect(Target, Range("F3:F8")) Then
grow = 3: orow = 6
Range(Cells(grow, gcol), Cells(orow, ocol)).Select
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
Worksheets("Sheet1").Sort.SortFields.Add Key:=Range(Cells(grow, ncol),
Cells(orow, ncol)), _
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
Worksheets("Sheet1").Sort.SortFields.Add Key:=Range(Cells(grow, ocol),
Cells(orow, ocol)), _
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
Worksheets("Sheet1").Sort.SortFields.Add Key:=Range(Cells(grow, lcol),
Cells(orow, lcol)), _
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet1").Sort
.SetRange Range(Cells(grow, gcol), Cells(orow, ocol))
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End If
End Sub
This sorts a soccer league table of 4 teams in a round robin event (G3:G6)
1st by points then goal difference then by goals scored, when match results
are entered into E3:F8 (column F is the event trigger). What I want to be
able to do is to extend this to a 2nd group of matches where the results are
entered into F13:F18 and the table is (G13:G18) and depending on the range of
cells the match results are entered the correct table is sorted. I hope
that all makes sense and would thank you in advance for any help you can give.
Al