+ Reply to Thread
Results 1 to 7 of 7

Copy multiple columns in multiple workbooks into a seperate worksheet (problem with code)

  1. #1
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Copy multiple columns in multiple workbooks into a seperate worksheet (problem with code)

    The following code won't let me copy from the first workbook. I get a run time 1004 error stating "That command cannot be used on multiple selections".

    I would rather not have to copy this by column for each of the 4 workbooks so any help getting this in just 4 copy/pastes would be greatly appreciated.

    Please Login or Register  to view this content.
    Last edited by Sc0tt1e; 02-27-2014 at 11:33 AM.

  2. #2
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: Copy multiple columns in multiple workbooks into a seperate worksheet (problem with co

    Bumpity bump

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Copy multiple columns in multiple workbooks into a seperate worksheet (problem with co

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: Copy multiple columns in multiple workbooks into a seperate worksheet (problem with co

    Almost there, I'm getting an error regarding the next i

    I get a Next without For error??? Any ideas what that is?

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: Copy multiple columns in multiple workbooks into a seperate worksheet (problem with co

    Bump, help!

  6. #6
    Registered User
    Join Date
    02-18-2014
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Copy multiple columns in multiple workbooks into a seperate worksheet (problem with co

    Hi,

    You have line 5 this : For i = 1 To 4
    In the middle of your code : Next i
    And in the end of your code too: Next i !!

    You have to put another for i= 1 to 4 in your code or delete one next i depending on what you want to do.

  7. #7
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: Copy multiple columns in multiple workbooks into a seperate worksheet (problem with co

    Ohhhh, I thought the original i = 1-4 would work for both.

    Cheers

+ 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. Copy & Pasting Multiple Cells and Ranges From Each Worksheet To a Seperate Sheet
    By tuc28869 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-25-2013, 02:57 PM
  2. [SOLVED] VBA code to copy cell range from all worksheets for multiple workbooks
    By Beany213 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-21-2013, 12:34 PM
  3. Copy worksheet to multiple workbooks in a folder
    By MysticGenius in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2012, 07:10 AM
  4. code help - consolidating multiple workbooks into one worksheet
    By Schretter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-09-2010, 06:41 PM
  5. Copy specific columns from mult workbooks to seperate workbook
    By excelgrrl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-02-2009, 10:12 AM

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