+ Reply to Thread
Results 1 to 5 of 5

Consolidate mutiple rows into one row based on ID

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Unhappy Consolidate mutiple rows into one row based on ID

    Hello all,

    Please see this image to better explain what I'm trying to do: http://i48.tinypic.com/6ep6og.jpg

    What's the best way to tackle this, any short macros or VBA's to do the job?

    Thanks
    Last edited by momozozo; 08-14-2012 at 04:28 PM.

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Consolidate mutiple rows into one row based on ID

    It's virtually impossible to use formula to concatenate an arbitrary number of strings, this would really be a job for a macro or a user-defined function.

    Something like this, perhaps:

    Please Login or Register  to view this content.
    So if, say, your ABCD bit was in A1:A10 and the values for concatenating were in B1:B10 you could use:

    =CONCATENATEIF(A1:A10,"ABCD1242",B1:B10)

    Does that help?

  3. #3
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Macro/VBA to consolidate mutiple rows into one row based on ID

    momozozo,

    You are posting a picture/graphic. This means that if this was a problem where one needed to use your data, anyone trying to help you would have to enter the data manually. That makes no sense and I doubt that you would get any answer.

    And, we can not tell what cells, rows, columns, your raw data is in.


    To get the most precise answer, it is best to upload/attach a sample workbook (sensitive data scrubbed/removed/changed) that contains an example of your raw data on one worksheet, and on another worksheet your desired results.

    The structure and data types of the sample workbook must exactly duplicate the real workbook. Include a clear and explicit explanation of your requirements.

    To attach your workbook, scroll down and click on the Go Advanced button, then scroll down and click on the Manage Attachments button.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  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/VBA to consolidate mutiple rows into one row based on ID

    MERGE ROWS
    Here's a macro for merging rows of data using the ID in column A and putting the column B values together in a delimited manner of your choosing. There's a sample file as well for testing.












    BTW, I have merged your two threads into one. As per forum rules, do not duplicate your topic.
    Last edited by JBeaucaire; 08-14-2012 at 09:24 PM.
    _________________
    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!)

  5. #5
    Registered User
    Join Date
    08-14-2012
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Macro/VBA to consolidate mutiple rows into one row based on ID

    Thanks much guys, I tried both methods and they work! You guys rock!

    Merci!

+ 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