+ Reply to Thread
Results 1 to 8 of 8

COPY from an open workbook with particular sheet and columns to active workbook

  1. #1
    Registered User
    Join Date
    09-06-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    26

    COPY from an open workbook with particular sheet and columns to active workbook

    Hi experts,
    i want to copy all cells that have data in column C on a sheet names record from the opened workbook calls old
    to column M in an active workbook with a sheet calls sheet2

    how can i do it with VBA code?

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: COPY from an open workbook with particular sheet and columns to active workbook

    Which workbook would you like to insert the code into?

  3. #3
    Registered User
    Join Date
    09-06-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: COPY from an open workbook with particular sheet and columns to active workbook

    in the workbook names "OLD".

  4. #4
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: COPY from an open workbook with particular sheet and columns to active workbook

    I'm sorry are you copying information from one workbook to another
    or
    copying information from one worksheet within one workbook to another worksheet within the same workbook?

    Thanks!

  5. #5
    Registered User
    Join Date
    09-06-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: COPY from an open workbook with particular sheet and columns to active workbook

    copying information from one workbook to another.
    from workbook names OLD to a new opened active workbook

  6. #6
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: COPY from an open workbook with particular sheet and columns to active workbook

    Hello there,
    If I understand you right the below code should work for you. It creates a new workbook and copies column C from the old workbook sheet record to column M of the new workbook sheet2

    Please Login or Register  to view this content.
    To use this code:

    1. Open the old workbook
    2. Press Alt+F8 to bring up the macro window
    3. Clear the macro name field
    4. Type CreateNewWB in the macro name field and then select the Create option
    5. In between the Sub CreateNewWB() and End Sub copy and paste the above code I supplied you
    6. Take a little time to read through the comments that appear in green. They will help you understand the code.
    7. Exit out of Visual Basic

    To run the code

    1. Press Alt+F8
    2. Select the CreateNewWB macro and then select run
    Last edited by rvasquez; 09-12-2012 at 03:08 PM.

  7. #7
    Registered User
    Join Date
    09-06-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: COPY from an open workbook with particular sheet and columns to active workbook

    THANKS! it works great! the comments are very helpful !

  8. #8
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: COPY from an open workbook with particular sheet and columns to active workbook

    No problem glad to help!

+ 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