View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.setup
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default sorting data from one tab on another

Put this in Worksheet code for Sheet1:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("A:A"), Target) Is Nothing Then
Exit Sub
End If
Application.EnableEvents = False
Sheets("sorted").Range("A:A").Clear
Sheets("Sheet1").Range("A:A").Copy Sheets("sorted").Range("A1")
Sheets("sorted").Range("A:A").Sort key1:=Sheets("sorted").Range("A1")
Application.EnableEvents = True
End Sub


Whenever data is changed in column A in Sheet1, the data is automatically
copied over to sheet "sorted" and sorted.
--
Gary''s Student - gsnu200718