+ Reply to Thread
Results 1 to 2 of 2

Auto copy and pasting

  1. #1
    cdixon
    Guest

    Auto copy and pasting

    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?


  2. #2
    Tom Ogilvy
    Guest

    Re: Auto copy and pasting

    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

    --
    Regards,
    Tom Ogilvy


    "cdixon" <[email protected]> wrote in message
    news:[email protected]...
    > 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?
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1