+ Reply to Thread
Results 1 to 12 of 12

How to combine data from multiple rows when common column headings exist?

  1. #1
    Registered User
    Join Date
    03-14-2013
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    6

    How to combine data from multiple rows when common column headings exist?

    I have been searching the forums for a while trying to find my answer but I'm not sure how to word it properly.

    I have a fairly large dataset that needs to be exported as CSV. It can not have the same column heading repeated but at this time there are many instances of that happening. I need to consolidate these headings and their respective data into single columns and remove duplicates. I have uploaded an example.

    Thanks in advance for your help!

    combine_common_columns.xls

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How to combine data from multiple rows when common column headings exist?

    try the macro
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-14-2013
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    6

    Re: How to combine data from multiple rows when common column headings exist?

    Thanks for the reply.

    I'm not quite sure I understand how to use that macro. I am relatively new to macros, could you explain a quick process for making it work on my data?

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How to combine data from multiple rows when common column headings exist?

    The macro will self=adjust to any number of columns and rows of data

    the sheets() contains the source and target tab names within the workbook

    place a chunk of your data (headings included) in sheet1
    clear the contents of the trimmed tab
    run the macro

  5. #5
    Registered User
    Join Date
    03-14-2013
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    6

    Re: How to combine data from multiple rows when common column headings exist?

    No resulting data in the 'trimmed' sheet after running the macro. Is there a certain version of Excel I need for this to work properly?

  6. #6
    Registered User
    Join Date
    03-14-2013
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    6

    Re: How to combine data from multiple rows when common column headings exist?

    Anyone else? I'm trying to run this Macro in Excel 2010 on Windows 7 and I get no result.

  7. #7
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How to combine data from multiple rows when common column headings exist?

    OK let's start to audit the process.

    1. Does the macro run as posted by me?

    2. Once it does, tell me your setuo and I'll make the proper adjustments.

  8. #8
    Registered User
    Join Date
    03-14-2013
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    6

    Re: How to combine data from multiple rows when common column headings exist?

    I downloaded your file directly to the machine, opened it in Excel 2010, deleted the contents of "Trimmed", ran the macro.

    No resulting data in "Trimmed".

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to combine data from multiple rows when common column headings exist?

    @rcm

    'Tis true
    No resulting data in "Trimmed"
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  10. #10
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How to combine data from multiple rows when common column headings exist?

    i'll work on it. I tried it and worked the first time..

  11. #11
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How to combine data from multiple rows when common column headings exist?

    This version worked!!!
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    03-14-2013
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    6

    Re: How to combine data from multiple rows when common column headings exist?

    @rcm I didn't get a chance to check your solution.

    This worked!
    http://stackoverflow.com/questions/1...headings-exist

+ 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