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
|