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
 

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

Similar Threads

Data sorting automatically? 10
Is it possible to have an image as a background? 0
pivot table - get the average of a field 1
Automatic Sorting? 6
Epic Games freebies 2
Dates 4
Excel Graph 2
Sort automatically 2

Back
Top