Automatic Data Sorting

N

Niebsmich

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
 
V

Vasant Nanavati

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top