Auto Sorting Data in Table

D

debra49424

Have a table that totals training points that we are manually sorting by
percentage of total points (difference between points earned and possible
points).

Looking for a way to have the table auto sort by the percentage when the
total points change. The chart is set up as follows:

Column B Column C-AG Column AH Column AI Column AJ
Names Points are entered Points sumed Possible Points % of
Possible Points

What I need it to do is when the points summed changes (which changes the %)
that the table automatically sorts the table from highest % to lowest % in
Column AJ.

Any suggestions/ideas are greatly appreciated.
dbarrow
 
L

Luke M

This assumes that column AH is manually changed. If AH is actually a
summation formula, and the actual changes are being made in C:AG, change the
Range called out in the intersect. Right click on sheet tab, paste this in:

'=============

Private Sub Worksheet_Change(ByVal Target As Range)
'This is the range to change if AH is a formula
If Intersect(Target, Range("AH:AH")) Is Nothing Then Exit Sub

Range("B:AJ").Sort Key1:=Range("AJ1"), Order1:=xlDescending, _
Header:=xlYes, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, DataOption1:=xlSortTextAsNumbers

End Sub
'============
 

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