+ Reply to Thread
Results 1 to 3 of 3

Consolidate Rows of Data Based on Single Column

  1. #1
    Registered User
    Join Date
    03-14-2006
    Posts
    12

    Consolidate Rows of Data Based on Single Column

    I have thousands and thousands of rows of data which look like the spreadsheet screen shot shown in this image:

    ExcelConsolidateRaw.JPG


    I want to consolidate them so that they look like the spreadsheet screen shot shown in this image:

    ExcelConsolidateDesired.JPG

    I used to have a macro/VBA code that would do this, but lost it sometime over the years. Does anyone have code that will do that? (I'm a novice and do not know how to write it; only how to insert it into a module in the VBA editor).

    Thank you for your help!

  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: Consolidate Rows of Data Based on Single Column

    'COLUMNS TO ROWS
    Here's a macro for merging columns of data to one row matching for column A. There's a sample workbook too you could drop your data into and test it out.
    Last edited by JBeaucaire; 12-26-2019 at 05:22 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!)

  3. #3
    Registered User
    Join Date
    03-14-2006
    Posts
    12

    Re: Consolidate Rows of Data Based on Single Column

    Thanks for this, Jerry.

    For some reason, however, I get an error when I run it. (Screen shot attached).

    It says, "Compile Error. Variable Not Defined."

    And then it highlights "xlSortTextAsNumbers".

    Any further ideas? Thanks again!

    Error-Excel Columns to Rows Part 3.JPG

  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: Consolidate Rows of Data Based on Single Column

    Upload your workbook with the macro installed so I can check your data and use of the macro at the same time. Thanks.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

+ 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. [SOLVED] Consolidate data in 2 rows into 1 row, based on column criteria
    By PeS in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-22-2012, 11:41 AM
  2. Replies: 0
    Last Post: 05-21-2012, 08:47 PM
  3. [SOLVED] How to consolidate data containing multiple colums and rows into single row in order?
    By seaspi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2012, 05:33 AM
  4. [SOLVED] Consolidate data into single rows
    By trent_mac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-07-2012, 03:58 PM
  5. consolidate data into a single column
    By jyj9ja in forum Excel General
    Replies: 5
    Last Post: 01-19-2012, 03:22 PM

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