+ Reply to Thread
Results 1 to 4 of 4

looping macro to reformat data from one sheet to another

  1. #1
    Registered User
    Join Date
    05-15-2008
    Posts
    6

    looping macro to reformat data from one sheet to another

    Hi: I'm using Excel 2003, version 11 and am trying to reformat data from one sheet to another. What I would like to do is copy the rows for each team from the Input sheet (Input tab) and and use them to build rows on the Output sheet (Output tab) for each possible combination of players.

    In my attached example, a three person team has three combinations and a five player team has ten combinations and so on. I know this is probably a loop within a loop but I can't seem to get the right combination. Not all teams are full yet so the number of players on a team will vary. I need macro code to make the input sheet look the output sheet.

    Any help is appreciated.

    The attached file does not contain macro code.

    John
    Attached Files Attached Files
    Last edited by rylo; 03-18-2009 at 05:56 PM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: looping macro to reformat data from one sheet to another

    Hi

    See how this goes.

    Please Login or Register  to view this content.
    rylo

  3. #3
    Registered User
    Join Date
    05-15-2008
    Posts
    6

    Re: looping macro to reformat data from one sheet to another

    rylo: Thanks for your speedy response. I copied your solution into the spreadsheet I submitted to the excelforum as macro "aaa" and got the following error message from VB: "Run time erro 1004. Unable to get the match property of the worksheet function class." I'm stumped.

    Does this suggest anything to you? I've not seen this particular error nor have I used the New Collection before. I recheck the code to make sure I pasted correctly and read up on the collection object. If the error message suggests something to you, send a note along.

    Thanks,
    John

  4. #4
    Registered User
    Join Date
    05-15-2008
    Posts
    6

    Smile Re: looping macro to reformat data from one sheet to another

    rylo: Disregard my previous message. I wasn't executing the macro from the correct sheet. Works perfectly. You solution is amazing.
    Thanks,
    John

+ 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