+ Reply to Thread
Results 1 to 5 of 5

Macro Copy & Paste data from 6 sheets to 1 new one

  1. #1
    Registered User
    Join Date
    10-19-2011
    Location
    Amsterdam, Holland
    MS-Off Ver
    Excel 2007
    Posts
    6

    Cool Macro Copy & Paste data from 6 sheets to 1 new one

    Every month 6 sheets get updated (new information is put in and old is automaticallty deleted) and I need to get the information out of the sheets to one new sheet.

    The sheets are called Start(2), Start(3).....Start(7). In every sheet there is a header row which I don't need copied to the new sheet called "Results". The new sheet already has a header row in it.

    So I need the data from Start(2) in Results and then I need the macro to find the next empty row and paste the information from Start(3) there, and so on....

    I'm quite a noob at macro's so i've been doing everything with record macro, but i can't get this to work. In contrary to what it says in my details i use excel 2007 :D

    Hope someone can help me here!!!

    Thanks in advance.
    Last edited by eMeLI; 10-19-2011 at 07:52 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro Copy & Paste data from 6 sheets to 1 new one

    Try this:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-19-2011
    Location
    Amsterdam, Holland
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Macro Copy & Paste data from 6 sheets to 1 new one

    It gives an Run-Time 9 error

    Subscript out of range

    And it refers to:

    For Each ws In Sheets(Array("Start(2)", "Start(3)", "Start(4)", "Start(5)", "Start(6)", "Start(7)"))

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro Copy & Paste data from 6 sheets to 1 new one

    So check the spelling of your sheet names, edit the macro to match exactly. You said Start(2), did you mean Start (2)?
    Last edited by JBeaucaire; 10-19-2011 at 07:35 AM.

  5. #5
    Registered User
    Join Date
    10-19-2011
    Location
    Amsterdam, Holland
    MS-Off Ver
    Excel 2007
    Posts
    6

    Smile Re: Macro Copy & Paste data from 6 sheets to 1 new one

    That works perfectly!!!! THANKS SOOO MUCH :D

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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