ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Auto Sorting Data in Table (https://www.excelbanter.com/excel-discussion-misc-queries/240292-auto-sorting-data-table.html)

debra49424

Auto Sorting Data in Table
 
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

Luke M

Auto Sorting Data in Table
 
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
'============
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"debra49424" wrote:

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



All times are GMT +1. The time now is 04:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com