Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    2

    Unanswered: automatic copy/paste

    i want to know if there is an automatic way to select a subset of rows containing infor and paste one by one into another empty row.

    assume there are 2 sheets in workbook
    say for ex i selected rows 7 to 9
    i want row 7 to be pasted in row 15 and open sheet2 and print out whatever is there in sheet2 and then row 7 in row 15(in sheet1) must be replaced by row 8 and go to sheet2 and print out the info in sheet2 and so on for all the selected rows(in this case rows 7,8 and 9)

    hope u guys understood the prob

    replies anticipated

  2. #2
    Join Date
    Oct 2003
    Posts
    1,091
    Probably can be done. But a little more information would be helpful. Can you post a sample? Or an attachment of what you want to happen?

    If you want to experiment, try using the macro recorder and do everything you want with a dummy file. After you finish recording, post the code here.
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

  3. #3
    Join Date
    Nov 2003
    Posts
    2
    Originally posted by shades
    Probably can be done. But a little more information would be helpful. Can you post a sample? Or an attachment of what you want to happen?

    If you want to experiment, try using the macro recorder and do everything you want with a dummy file. After you finish recording, post the code here.
    ok here is what i wanted:

    say this is the data in excel file

    (rows/columns)--A B C D E F G ........
    1
    pasting row-> 2
    3
    4
    5
    6 name SSN
    7 name1 SSN1
    8 name2 SSN2
    9


    think of the above as an excel worksheet. i want to select rows 6 to 8 and when i run the macro the macro shud paste each row individually in pasting row(i.e., row 2 in above illustration). once the rows 6 to 8 are selected 6th row is pasted in row 2 and the info is copied into another worksheet. once it is copied into another worksheet row 7 will replace row 6 in row 2 and this info is copied into row below row 6 info in another worksheet and so on.

    this shud work even if the user selects rows 7 and 8. so the selection of rows is unknown to the programmer. the user may select all the rows or only few rows.

    hope u understand this.

    Thank you!

Posting Permissions

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