+ Reply to Thread
Results 1 to 8 of 8

vba matching columns of data and copy/pasting to new row on different sheet

  1. #1
    Registered User
    Join Date
    08-23-2011
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    5

    vba matching columns of data and copy/pasting to new row on different sheet

    Hi,

    I've been doing lots of searches and cannot find how to complete my task.

    I have attached an example document.

    Basically on the "All Data" sheet I have a lots of participant IDs in Column A. Basically what I want to do is to combine all data for each participant into one line onto the sheet "Collated Data".

    Hope that is self-explanatory enough.

    Your help is greatly appreciated!!
    Last edited by maybefrog; 10-27-2011 at 07:35 PM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: vba matching columns of data and copy/pasting to new row on different sheet

    Your attached file is not visible.

    Also, if i understand your problem correctly, vlookup can help you out to get the information you need. However, i can say for certain once i have a glance at your attachment.

  3. #3
    Registered User
    Join Date
    08-23-2011
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: vba matching columns of data and copy/pasting to new row on different sheet

    Ok, sorry! I'll try again, thanks.

    Basically I need to copy and paste the data from "All Data" into "Collated Data" so that all the information for each participant is all on one line, rather than underneath each other.

    The problem is there is a different amount of data lines for each participant.

    Your help will be greatly appreciated.

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: vba matching columns of data and copy/pasting to new row on different sheet

    I have this code for you which works when i tested it. Let me know if you face any problems.

    Please Login or Register  to view this content.
    P.S - When i tried to understand your problem, it did look pretty tough to convert into VBA. But when it was finally done, i didnt expect it to be that easy.

  5. #5
    Registered User
    Join Date
    08-23-2011
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: vba matching columns of data and copy/pasting to new row on different sheet

    It worked perfectly. Thanks so much for you help. This will save a lot of time.

    Cheers again!

  6. #6
    Registered User
    Join Date
    08-23-2011
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: vba matching columns of data and copy/pasting to new row on different sheet

    Thanks so much for your previous help. I am now trying to modify the code in order to do the exact same thing, but for another set of data, but I am running into the problem that it only does the first line and doesn't keep going. Which part of the text am I meant to modify to get it to go to next line?

    I have attached my workbook and here is the code.

    Your help is greatly appreciated!

    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: vba matching columns of data and copy/pasting to new row on different sheet

    You have some merged fields there which are creating problems in the cell referencing. Change the 1st 2 lines to the below :

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    08-23-2011
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: vba matching columns of data and copy/pasting to new row on different sheet

    Thanks heaps, that fixed it.

    Cheers

+ 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