Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Defoes Right Boot
 
Posts: n/a
Default 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   Report Post  
Paul B
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i automatically sort a list Defoes Right Boot Excel Worksheet Functions 0 February 3rd 05 02:19 PM
How do I sort a birthdate list by month then day regardless of ye. ejeff Excel Discussion (Misc queries) 1 December 11th 04 09:56 PM
Excel Auto Filter: WHY'S SORT @ TOP OF LIST? WHEN I KEY TO "SHOW . Dan W Excel Worksheet Functions 0 December 1st 04 03:53 PM
How can I sort an entire spreadsheet from a list prod sorter Excel Worksheet Functions 4 November 17th 04 03:43 AM
sort automatically Mike Lemke Excel Worksheet Functions 2 October 31st 04 08:18 PM


All times are GMT +1. The time now is 11:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"