Automatic Data Sorting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way to automatically sort some range of data every time a value within it is changed

For example keeping point totals for a game, and every time someone gets another point and I add it, the list of total points will automatically indicate this new person has taken the point lead
 
Right-click on the worksheet tab, select View Code, and paste this code into
the code pane:

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Target.Column = 2 Then Target.CurrentRegion.Sort Target, xlDescending
End Sub



Assumes scores are in column B.

Post back if you have problems as many things can affect the sorting.

--

Vasant



Niebsmich said:
Is there any way to automatically sort some range of data every time a value within it is changed?

For example keeping point totals for a game, and every time someone gets
another point and I add it, the list of total points will automatically
indicate this new person has taken the point lead
 
Back
Top