automatic sorting
Try this 'event code' (must right-click the tab of the SS that you are
running it on, select 'view code' and paste it into the window that opens up).
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim EndData As Long
If Target.Column < 2 Then Exit Sub
Application.ScreenUpdating = False
EndData = Cells(Rows.Count, 1).End(xlUp).Row
With Range(Cells(2, 1), Cells(EndData, 2))
.Sort Key1:=Range("B2"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End With
Application.ScreenUpdating = False
End Sub
Notice!! You will sort on Column B; change this to suit your needs.
Regards,
Ryan---
--
RyGuy
"bkunes" wrote:
I have many columns of corresponding data, i was wondering if there was a way
to not only sort one column but have the coresponding data in other columns
sort with it. I need an automatic sort beacause the data is to be refreshed
frequently and the actual sort a list comand is not reasonable. If anyone
could help it would be much apreciated, i am co-op and could use all the help
i can get.
Thank you
--
|