Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How do I sort a list automatically?
I have a range of indeterminate length consisting of 3 columns (name, team,
goals - it's a top-scorer list.) What I want to do is have Excel automatically sort the full range based on the Goals column whenever data is added to the list (ie new scorer entered) or edited (ie existing scorer gets another goal.) to keep the list always in order of most goals scored. Anyone got any ideas? |
#2
|
|||
|
|||
Defoes, try this
This assumes that your first row is a header row, and that you put data in columns A & B and then in C, it will sort by column C when data is put, or changed, in column C. Right click on the worksheet tab and view code, paste in the window that opens Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 3 Then Range("A:C").Sort Key1:=Range("C2"), Order1:=xlDescending, _ Header:=xlYes, OrderCustom:=1, MatchCase:=False, _ Orientation:=xlTopToBottom End If End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Defoes Right Boot" wrote in message ... I have a range of indeterminate length consisting of 3 columns (name, team, goals - it's a top-scorer list.) What I want to do is have Excel automatically sort the full range based on the Goals column whenever data is added to the list (ie new scorer entered) or edited (ie existing scorer gets another goal.) to keep the list always in order of most goals scored. Anyone got any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do i automatically sort a list | Excel Worksheet Functions | |||
How do I sort a birthdate list by month then day regardless of ye. | Excel Discussion (Misc queries) | |||
Excel Auto Filter: WHY'S SORT @ TOP OF LIST? WHEN I KEY TO "SHOW . | Excel Worksheet Functions | |||
How can I sort an entire spreadsheet from a list | Excel Worksheet Functions | |||
sort automatically | Excel Worksheet Functions |