Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 57
Default can i automaticity sort data in a table

can i automaticity sort date in a table as i enter it row by row
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default can i automaticity sort data in a table

Lets say we are entering data in columns A, B, & C, one row at a time. After
entering the value in column C, we want the data to automatically re-sort by
column A.

Enter the following code in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set t = Target
Set c = Range("C:C")
If Intersect(t, c) Is Nothing Then Exit Sub
Application.EnableEvents = False
Columns("A:C").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
t.Offset(1, -2).Select
Application.EnableEvents = True
End Sub


REMEMBER: the worksheet code area, not a standard module.
--
Gary''s Student - gsnu200770


"allan" wrote:

can i automaticity sort date in a table as i enter it row by row

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default can i automaticity sort data in a table

Just be very careful when entering data.

After you enter an incorrectly spelled string or wrong number and the autosort
takes place, it may be difficult to track the error.


Gord Dibben MS Excel MVP

On Thu, 21 Feb 2008 05:42:02 -0800, allan
wrote:

can i automaticity sort date in a table as i enter it row by row


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default can i automaticity sort data in a table

In my scenario there are columns A through O where as a case gets added to
the monthly load it goes on the list columns a and b are entered, then it
comes in enter a date into column c then I start the process column D gets a
date, I have a sort indicator set up in a column to sort by 1 through 16, I
want the system to auto sort every time I change the sort indicator from 1
through to 16, based on your model do I change the "C" to the column with the
sort indicator?

Thank you for your help.
--
Judy Rose Cohen


"Gary''s Student" wrote:

Lets say we are entering data in columns A, B, & C, one row at a time. After
entering the value in column C, we want the data to automatically re-sort by
column A.

Enter the following code in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set t = Target
Set c = Range("C:C")
If Intersect(t, c) Is Nothing Then Exit Sub
Application.EnableEvents = False
Columns("A:C").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
t.Offset(1, -2).Select
Application.EnableEvents = True
End Sub


REMEMBER: the worksheet code area, not a standard module.
--
Gary''s Student - gsnu200770


"allan" wrote:

can i automaticity sort date in a table as i enter it row by row

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
pull data from a table and sort into list PL New Users to Excel 4 June 26th 07 12:20 AM
How do I sort the the data within a Pivot table (not sum data) John87111 Excel Discussion (Misc queries) 1 June 20th 07 05:45 PM
Sort Pivot Table using hidden data field goofy11 Excel Discussion (Misc queries) 4 February 3rd 06 08:13 PM
how do i automatically sort data in a pivot table Esche Excel Worksheet Functions 1 June 11th 05 12:43 PM
How do I sort a pivot table with 2 data rows desending? vot Excel Discussion (Misc queries) 0 April 29th 05 07:00 PM


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