Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Sorting dataset automatically after entering data in a row [or cel



If I have a spreadsheet with four column, and rows starting at row 2
[headings are in row 1], and increasing daily.

One of the columns is a "priority" column, which is 1 [for the highest] down
to 5 [for lowest].

I'd like to sort the data each time a new row is entered, such that the
highest priorities are listed first.

Is there a way for this to happen automatically? Or would I have to, at the
least, create a Macro and put that button on the toolbar to press when I want
a sort to take place?


Any help would be greatly appreciated.

Thanks.
m

[I apologize that this accidentally went in the FrontPage forum as well...
sorry about that].
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Sorting dataset automatically after entering data in a row [or cel

Hi MatthewS

You can use the change event in the sheet module to sort when you enter a value in column A

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
Range("A:A").Sort Key1:=Range("A2"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End If
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"MatthewS" wrote in message ...


If I have a spreadsheet with four column, and rows starting at row 2
[headings are in row 1], and increasing daily.

One of the columns is a "priority" column, which is 1 [for the highest] down
to 5 [for lowest].

I'd like to sort the data each time a new row is entered, such that the
highest priorities are listed first.

Is there a way for this to happen automatically? Or would I have to, at the
least, create a Macro and put that button on the toolbar to press when I want
a sort to take place?


Any help would be greatly appreciated.

Thanks.
m

[I apologize that this accidentally went in the FrontPage forum as well...
sorry about that].



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Sorting dataset automatically after entering data in a row [or cel

Oops

Change this to your columns

If your data is in A:Z use

Range("A:Z").Sort................................. .



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Ron de Bruin" wrote in message ...
Hi MatthewS

You can use the change event in the sheet module to sort when you enter a value in column A

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
Range("A:A").Sort Key1:=Range("A2"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End If
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"MatthewS" wrote in message ...


If I have a spreadsheet with four column, and rows starting at row 2
[headings are in row 1], and increasing daily.

One of the columns is a "priority" column, which is 1 [for the highest] down
to 5 [for lowest].

I'd like to sort the data each time a new row is entered, such that the
highest priorities are listed first.

Is there a way for this to happen automatically? Or would I have to, at the
least, create a Macro and put that button on the toolbar to press when I want
a sort to take place?


Any help would be greatly appreciated.

Thanks.
m

[I apologize that this accidentally went in the FrontPage forum as well...
sorry about that].





  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Sorting dataset automatically after entering data in a row [or

Many thanks... I will give that a shot.

"Ron de Bruin" wrote:

Oops

Change this to your columns

If your data is in A:Z use

Range("A:Z").Sort................................. .



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Ron de Bruin" wrote in message ...
Hi MatthewS

You can use the change event in the sheet module to sort when you enter a value in column A

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
Range("A:A").Sort Key1:=Range("A2"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End If
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"MatthewS" wrote in message ...


If I have a spreadsheet with four column, and rows starting at row 2
[headings are in row 1], and increasing daily.

One of the columns is a "priority" column, which is 1 [for the highest] down
to 5 [for lowest].

I'd like to sort the data each time a new row is entered, such that the
highest priorities are listed first.

Is there a way for this to happen automatically? Or would I have to, at the
least, create a Macro and put that button on the toolbar to press when I want
a sort to take place?


Any help would be greatly appreciated.

Thanks.
m

[I apologize that this accidentally went in the FrontPage forum as well...
sorry about that].






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
Update data automatically among worksheets Leo Excel Discussion (Misc queries) 1 May 4th 06 04:46 PM
Sorting Data that feeds into other formulas.... Kittine Excel Discussion (Misc queries) 1 July 26th 05 08:21 PM
Printing data validation scenarios SJC Excel Worksheet Functions 14 July 24th 05 12:43 AM
Sorting data automatically Graham Mason Excel Worksheet Functions 2 May 21st 05 09:45 PM
Sorting Data Automatically Alan Bartley Excel Discussion (Misc queries) 1 December 8th 04 01:51 PM


All times are GMT +1. The time now is 12:50 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"