Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Setup / May 2007

Tip: Looking for answers? Try searching our database.

sorting data from one tab on another

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rusty - 01 May 2007 17:57 GMT
I have a spread sheet with a list of users sorted alphabetically.  I'd like
to sort that data by userID on a different tab.  Problem is, I don't want to
manually do it.  Is there a way to have the 'ID sorted tab' automatically
update and sort itself as I make changes to the 'alphabetical tab'?

Thanks for your help!
Gary''s Student - 01 May 2007 19:16 GMT
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.
Signature

Gary''s Student - gsnu200718

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.