+ Reply to Thread
Results 1 to 5 of 5

Copying Rows

  1. #1
    Registered User
    Join Date
    04-28-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    2

    Copying Rows

    I am very green when it comes to excel, but I am learning. I would like to know if it is possible and how to make this happen.

    I want every row I create in a book to copy to the first book. So every row I make in book 2, book 3 and book 4 automatically copies the information into a new row in book 1. Is this possible and how do I do it?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,451

    Re: Copying Rows

    In principle, yes, it is possible. You would require a Workbook_Sheetchange event or individual Worksheet_Change events in each sheet. If the format of every sheet is the same, you could use the Workbook_Sheetchange event. Then again, it depends on whether or not you need to identify the source of the copied sheets. You could monitor a specific column where you put a marker/flag to say the row is complete.

    Did you mean Book1, Book2, Book3, etc., or should that be Sheets?

    I suggest that you post sample workbooks and more detail about what you want to achieve.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    04-21-2012
    Location
    singapore
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Copying Rows

    I think you are referring a new worksheet within a book?

    If so, see attached.
    Basically, you can duplicate another worksheet by ticking the "Create a copy box"
    hope this helps

    1.jpg

  4. #4
    Registered User
    Join Date
    04-28-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Copying Rows

    I am sorry, I did mean sheets, not books. How do I create a Workbook_Sheetchange?

    Quote Originally Posted by TMShucks View Post
    In principle, yes, it is possible. You would require a Workbook_Sheetchange event or individual Worksheet_Change events in each sheet. If the format of every sheet is the same, you could use the Workbook_Sheetchange event. Then again, it depends on whether or not you need to identify the source of the copied sheets. You could monitor a specific column where you put a marker/flag to say the row is complete.

    Did you mean Book1, Book2, Book3, etc., or should that be Sheets?

    I suggest that you post sample workbooks and more detail about what you want to achieve.

    Regards, TMS

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,451

    Re: Copying Rows

    Press Alt-F11 to open the VBE.
    Double Click on the ThisWorkbook item in the VBAProject on the left of the Editor to open it.
    Click on the down arrow on the left hand selection box and choose Workbook.
    In the right hand selection box, choose SheetChange.

    This will create the framework/skeleton for the event.

    You then need code to monitor the sheet(s) and copy rows when they are changed. Ideally, you'd need to monitor a specific column for a specific flag. When that column has the correct value entered, you'd copy the row to the other sheet.

    Again, I would suggest you post a sample workbook and more detail about what you want to achieve.

    Regards, TMS

+ 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