|
Re: Need a Help to AutoSort a Table in Excel 2007
Dear All
Can anyone please help me to AutoSort a Table in Sheet4 ("Fixtures") of the Attached Excel 2007 Worksheet "IPL V (AutoSort).xlsx". The Key to Sort on are Points (Column G) and Net Run Rate (Column H) in Descending Order
The Table should be sorted as and when any addition / modification / deletion takes place in the Range ("I3:U78") of Sheet5 ("Fixtures")
Thanks
P S : I have appended VB Code I am unsuccessfully using herebelow
-------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Not (Application.Intersect(Worksheets("Fixtures").Range("I3:U74"), Target) Is Nothing) Then
DoSort
End If
End Sub
Private Sub DoSort()
Worksheets("Points Table").Range("A3:W11").Sort Key1:=Worksheets("Points Table").Range("G3:G11"), Order1:=xlDescending, _
Key2:=Worksheets("Points Table").Range("H3:H11"), Order2:=xlDescending, Header:=xlNo
End Sub
--------------
__________________
|