Results 1 to 6 of 6

copy /pasting

This is a discussion on copy /pasting within the Excel Questions forums, part of the Question Forums category; Hi guys I want to copy data from one worksheet to another I just want the data to follow each ...

  1. #1
    Board Regular
    Join Date
    Aug 2002
    Posts
    197

    Default

    Hi guys

    I want to copy data from one worksheet to another I just want the data to follow each other.

    this is some data
    this is more data
    and some more


    Hope this makes sence





  2. #2
    Board Regular XL-Dennis's Avatar
    Join Date
    Jul 2002
    Location
    Östersund, Sweden
    Posts
    1,922

    Default

    cgriff,

    I assume that the worksheets are in the same workbook.

    Select the cellarea on Sheet1 by
    - select first cell and then hold down the left mousebutton to select the others cells.

    Select a command for copying
    - Edit | Copy

    Paste to Sheet2
    - Click on the Sheets2 tab (on the bottom of the screen if XL has a maximized window)
    - Place the cursor in the first target cell
    - Select a command for pasting, Edit | Paste

    Please mail back if this does not solve the problem
    Kind regards,
    Dennis

    .NET & Excel | 2nd edition PED | MVP

  3. #3
    New Member
    Join Date
    Aug 2002
    Posts
    15

    Default

    Depending on what you actually want/need to do, I have literally hundreds of ways to help... up to and including pasting an entire worksheet (from another source) into the current worksheet you are in.

    e-mail me and I'll be glad to help.

    Kkranz

  4. #4
    Board Regular
    Join Date
    Aug 2002
    Posts
    197

    Default

    I think I have not quite explained,
    if I have a row of data in row 1 sheet 1
    I want to copy this data to sheet 2 row 1
    Then I want to go to sheet 1 copy row 1 again copy and put this data in row 2 sheet 2
    My data changes in sheet 1 row 1 from another sheet, this is why it wants to go to a new line each time in sheet 2


    I want to do this with a macro ?

    Thanks

  5. #5
    Board Regular XL-Dennis's Avatar
    Join Date
    Jul 2002
    Location
    Östersund, Sweden
    Posts
    1,922

    Default

    cgriff,

    I think I have not quite explained,
    That´s correct

    Ok, here we go:

    Sub CopySheet1ToSheet2()

    Dim wbBook As Workbook

    Dim wsSheet1 As Worksheet, wsSheet2 As Worksheet

    Dim rnSource As Range, rnTarget As Range



    Set wbBook = ThisWorkbook

    Set wsSheet1 = wbBook.Worksheets("Sheet1")

    Set wsSheet2 = wbBook.Worksheets("Sheet2")



    With wsSheet1

    Set rnSource = .Range("A1:L1")

    End With



    With wsSheet2

    Set rnTarget = .Range("A65536").End(xlUp).Offset(1, 0)

    End With



    rnSource.Copy rnTarget



    End Sub


    It will copy values from rang A1:L1 in Sheet1 to the first available row starting from A1 in Sheet2.
    Kind regards,
    Dennis

    .NET & Excel | 2nd edition PED | MVP

  6. #6
    Board Regular
    Join Date
    Aug 2002
    Posts
    197

    Default

    Thanks dennis
    just what i was looking for

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
  •  


DMCA.com