+ Reply to Thread
Results 1 to 5 of 5

copy a single column from mutiple workbooks into a single workbook

  1. #1
    Registered User
    Join Date
    02-01-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    33

    copy a single column from mutiple workbooks into a single workbook

    Hello,

    I am after a macro that works through a sequential list of workbooks and copies column G from each workbook and posts it into a master workbook in a sequential order, i.e. column G (workbook 1) to Column B (master workbook), column G (workbook 2) to Column C (master workbook) and so on.

    Unfortunately I am family new to VBA so any help you could provide me writing and using said macro would be really appreciated.

    Here is some additional information that may be of use to you.

    The workbooks containing column G are currently called r0001_scen_dly.csv, r0002_scen_dly.csv, r0003_scen_dly.csv up to 1001. They are all currently located within the same directory: C:\Documents and Settings\S151197\Desktop\Cambridge NIAB (Low)\WG daily time series (all variables).

    Regards

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: copy a single column from mutiple workbooks into a single workbook

    You know you only have 256 columns in Excel 2003 don't you?

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    02-01-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: copy a single column from mutiple workbooks into a single workbook

    I am using Excel 2007, the information on my profile wasn't correctly updated.

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: copy a single column from mutiple workbooks into a single workbook

    Not tested but try this:

    Please Login or Register  to view this content.

    Dom

  5. #5
    Registered User
    Join Date
    02-01-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: copy a single column from mutiple workbooks into a single workbook

    Thank you Dom

    You have just spared me countless hours, the script works fine

    Regards

+ 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