Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Keeping an Excel list sorted

I am trying to make a list that has 4 columns, one of which is a date
(that is continually updated because it is a "last time contacted"
date).

I would like to have it so that the list is continually updating and
every time I change the date on one of the rows, it is automatically
sorted without me having to click sort every time.

Anyone know how to make this happen?

Thanks.

Ben

  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Keeping an Excel list sorted

Here's a Change-event macro that should re-sort your data based on a change
in a cell in Column A..........

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Macro will re-sort column A on any change to a cell in column A
ActiveCell.Select
If ActiveCell.Column = 1 Then 'Limits macro action to column A
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Else
End If
End Sub

hth
Vaya con Dios,
Chuck, CABGx3



" wrote:

I am trying to make a list that has 4 columns, one of which is a date
(that is continually updated because it is a "last time contacted"
date).

I would like to have it so that the list is continually updating and
every time I change the date on one of the rows, it is automatically
sorted without me having to click sort every time.

Anyone know how to make this happen?

Thanks.

Ben


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Keeping an Excel list sorted

Thank you very much for the reply, but I am a little unsure what a lot
of it means. Can you break it down in laymans terms how to go about
making an automatically sorting list? Thanks a lot.
-Ben


CLR wrote:
Here's a Change-event macro that should re-sort your data based on a change
in a cell in Column A..........

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Macro will re-sort column A on any change to a cell in column A
ActiveCell.Select
If ActiveCell.Column = 1 Then 'Limits macro action to column A
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Else
End If
End Sub

hth
Vaya con Dios,
Chuck, CABGx3



" wrote:

I am trying to make a list that has 4 columns, one of which is a date
(that is continually updated because it is a "last time contacted"
date).

I would like to have it so that the list is continually updating and
every time I change the date on one of the rows, it is automatically
sorted without me having to click sort every time.

Anyone know how to make this happen?

Thanks.

Ben



  #4   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Keeping an Excel list sorted

Copy the code from the post, then right-click on the tab of the sheet you
want the macro to be active on and select ViewCode from the dropdown. Then
paste the macro into the large window on the right. From then on it should
work automatically.....anytime there is any change to a cell in column A, the
macro will fire and sort column A, ascending.

Vaya con Dios,
Chuck, CABGx3


" wrote:

Thank you very much for the reply, but I am a little unsure what a lot
of it means. Can you break it down in laymans terms how to go about
making an automatically sorting list? Thanks a lot.
-Ben


CLR wrote:
Here's a Change-event macro that should re-sort your data based on a change
in a cell in Column A..........




Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Macro will re-sort column A on any change to a cell in column A
ActiveCell.Select
If ActiveCell.Column = 1 Then 'Limits macro action to column A
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Else
End If
End Sub



hth
Vaya con Dios,
Chuck, CABGx3



" wrote:

I am trying to make a list that has 4 columns, one of which is a date
(that is continually updated because it is a "last time contacted"
date).

I would like to have it so that the list is continually updating and
every time I change the date on one of the rows, it is automatically
sorted without me having to click sort every time.

Anyone know how to make this happen?

Thanks.

Ben




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
Want to Create a List in Excel 2002; Don't see List in Data Menu? Manoj Excel Discussion (Misc queries) 2 April 7th 06 07:34 PM
Can Excel list order according to Total scores? PaulT Excel Worksheet Functions 2 March 25th 06 11:54 AM
An alphabetically sorted list of findings... JemyM Excel Discussion (Misc queries) 4 September 19th 05 06:50 PM
Excel List range, filter arrows disappeared andrew Excel Discussion (Misc queries) 3 April 1st 05 11:30 PM
Excel 2003: Match one list against another and highlight differenc smithers2002 Excel Worksheet Functions 1 January 11th 05 03:22 PM


All times are GMT +1. The time now is 11:43 AM.

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"