+ Reply to Thread
Results 1 to 3 of 3

Combining Multiple Rows in to Single Rows

  1. #1
    Registered User
    Join Date
    11-15-2011
    Location
    Wichita, Kansas
    MS-Off Ver
    Excel 2010
    Posts
    3

    Combining Multiple Rows in to Single Rows

    I've attached a sample workbook of the data that I need to be consolidated. My large workbook contains hundreds of names with multiple lines each. I need for all lines for each name to be consolidated in to a single line. The amounts listed in columns I through AE are all correct and in their proper positions. They simply need to be moved "up" so that they all align in a single row. Is it even possible to do this?

    Thank you very much.

  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: Combining Multiple Rows in to Single Rows

    This should do it, it will create a new table off to the right.

    Please Login or Register  to view this content.

    How/Where to install the macro:

    1. Open up your workbook
    2. Get into VB Editor (Press Alt+F11)
    3. Insert a new module (Insert > Module)
    4. Copy and Paste in your code (given above)
    5. Get out of VBA (Press Alt+Q)
    6. Save as a macro-enabled workbook

    The macro is installed and ready to use. Press Alt-F8 and select it from the macro list.
    _________________
    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
    11-15-2011
    Location
    Wichita, Kansas
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Combining Multiple Rows in to Single Rows

    Thank you, JBeaucaire! That macro worked great on my test example. When I tried to run it on my worksheet, I got the following error:

    "Run-time error '1004':
    Application-defined or object-defined error"

    It seems like everything worked like it was supposed to, though. How would I fix this? Sorry, I'm not too great with macros and VB. I only have minimal experience.

    Also, I've just noticed one other issue. With some of my names of data, they have separate dates. Is it possible to do everything your macro did, but keep separate lines based on the date?

    Thank you

+ 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