+ Reply to Thread
Results 1 to 11 of 11

Basic Macro for copying 2 Columns from one workbook to another

  1. #1
    Registered User
    Join Date
    01-07-2014
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2013
    Posts
    33

    Basic Macro for copying 2 Columns from one workbook to another

    I have a basic question for a macro, I've looked at other threads but they all seem to have some kind of twist to it. All I want is a macro that copies columns A&B from a source workbook to my destination workbook in a specific worksheet for column A&B too. I'm assuming that the destination worksheet will automatically update whenever the source workbook is updated? My source workbook is called Job List 7 and the worksheet is called Master Job List, my destination is Ted's Timesheet and the sheet is called Job List. If i should attach my timesheet for more info then please let me know.

  2. #2
    Registered User
    Join Date
    03-05-2014
    Location
    Grand Rapids, Michigan
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Basic Macro for copying 2 Columns from one workbook to another

    Something like this might work... of course you would have to have both workbooks open for it to function correctly.

    Sub CopyAB()

    Application.WindowState = xlMinimized
    Columns("A:B").Select
    Selection.Copy
    Windows("Job List 7.xls").Activate
    ActiveSheet.Paste
    End Sub

  3. #3
    Registered User
    Join Date
    01-07-2014
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2013
    Posts
    33

    Re: Basic Macro for copying 2 Columns from one workbook to another

    Is it not possible to have the source workbook closed for the macro to work? is there an alternative perhaps? The reason i want this macro is to avoid opening the source file when i need to work on my timesheet (Ted's TImesheet)

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Basic Macro for copying 2 Columns from one workbook to another

    Maybe:

    Please Login or Register  to view this content.
    @ SuddenImpact. Please use code tags when posting.
    Last edited by JOHN H. DAVIS; 04-07-2014 at 06:37 AM.

  5. #5
    Registered User
    Join Date
    01-07-2014
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2013
    Posts
    33

    Re: Basic Macro for copying 2 Columns from one workbook to another

    thank you! it worked.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Basic Macro for copying 2 Columns from one workbook to another

    You're welcome. Glad to help out and thanks for the feedback. Please comply with Forum Rule No. 9.

    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

  7. #7
    Registered User
    Join Date
    01-07-2014
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2013
    Posts
    33

    Re: Basic Macro for copying 2 Columns from one workbook to another

    Thank you, was trying to find that solve button everywhere!

  8. #8
    Registered User
    Join Date
    01-07-2014
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2013
    Posts
    33

    Re: Basic Macro for copying 2 Columns from one workbook to another

    I just realised that the macro is not keeping up to date with the job list? is there a formula i can add to make the macro refresh or keep up to date each time the worksheet is opened?

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Basic Macro for copying 2 Columns from one workbook to another

    Maybe:

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    01-07-2014
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2013
    Posts
    33

    Re: Basic Macro for copying 2 Columns from one workbook to another

    Worked, Thank you very much.

  11. #11
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Basic Macro for copying 2 Columns from one workbook to another

    Once again, you're welcome. Glad to help out.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Copying Data from worksheets of workbook to another workbook with macro.
    By peejaygee in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-18-2014, 03:11 PM
  2. Copying columns from two different workbooks into one workbook
    By bittersweets in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-30-2013, 05:37 AM
  3. Macro for copying multiple columns and pasting 'n' times to another workbook
    By busybee235 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 10-01-2012, 02:10 PM
  4. Macro Help With Copying Multiple Columns to New Workbook
    By bigkahuna2187 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2012, 11:53 AM
  5. Copying columns from one workbook to another
    By peterl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-12-2007, 07:38 PM

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