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 / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Auto copy and pasting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cdixon - 23 Jan 2006 01:01 GMT
Need help. I need a macro or program that can sort and copy the
information I enter in one sheet over to another sheet. The information
needs to be sorted by name and filed on the distention sheet in that
order. As I enter the information or by a command.
Example:
Sheet 1:        John
        Tom
        Jim
        Bob
        Tom
        Bob

Sheet 2 The information would look like this

        John
        Tom
        Tom
        Bob
        Bob

Any Idea or am I in to deep?
Tom Ogilvy - 23 Jan 2006 01:10 GMT
Private Sub CommandButton1_Click()
Dim rng as Range
Worksheets("Sheet2").Cells.ClearContents
set rng = Worksheets("Sheet1").Range("A1").CurrentRegion
rng.copy Destination:=Worksheets("Sheet2").Range("A1")
set rng = Worksheets("Sheet2").Range("A1").CurrentRegion
rng.sort Key:=rng.Parent.Range("A1")
End Sub

Signature

Regards,
Tom Ogilvy

> Need help. I need a macro or program that can sort and copy the
> information I enter in one sheet over to another sheet. The information
[quoted text clipped - 17 lines]
>
> Any Idea or am I in to deep?
 
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.