+ Reply to Thread
Results 1 to 4 of 4

Merging Multiple Rows and Columns into a single Row

  1. #1
    Registered User
    Join Date
    01-13-2010
    Location
    Oxford
    MS-Off Ver
    Excel 2010
    Posts
    57

    Merging Multiple Rows and Columns into a single Row

    Hi All

    This feels like a very complicated question and I've searched the best way I know how to find an answer but not sure any of the solutions help with what I am trying to achieve

    I have a large .CSV file (can be changed to .xlsx if needed) which has a list of reviews with multiple responses and each response is a new row but with the same review ID (See example below)

    Review ID Question 1 Question 2 Question 3

    1 5
    1 4
    1 3



    Essentially, to be able to properly analyse this data I want to merge those rows with the same ID into 1 single row with all of the answers still under their respective columns

    Is that possible and what is the best method of doing this?

    Thanks for any help or guidance

    Daniel

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Merging Multiple Rows and Columns into a single Row

    It sounds like a simple Pivot Table may be all that you need, but your example doesn't help...

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    01-13-2010
    Location
    Oxford
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Merging Multiple Rows and Columns into a single Row

    Hi Olly

    I've added an example file in the format you've request (hopefully it makes sense)

    There are quite a few rows but in my head, a solution for 1 row should be applicable to all rows as long as the merging review ID is the same

    Let me know if anything else is needed

    Thanks

    Dan_B
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Merging Multiple Rows and Columns into a single Row

    I moved your results section to add another review id:

    =IFERROR(INDEX($A$3:$A$24,MATCH(0,INDEX(COUNTIF($L$2:$L2,$A$3:$A$24),0),0)),"")

    copied down

    and

    =IFERROR(INDEX(B:B,AGGREGATE(15,6,ROW($B$3:$B$24)/((B$3:B$24>0)*(B$3:B$24<>"Null")),ROWS($1:1))),"")

    copied across and down.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

+ 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. Replies: 6
    Last Post: 03-20-2015, 03:20 PM
  2. Replies: 9
    Last Post: 12-15-2013, 10:05 PM
  3. Replies: 5
    Last Post: 05-25-2013, 07:12 AM
  4. Merging Multiple Columns Into a Single Column
    By shrike37 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-01-2013, 12:31 PM
  5. Moving data from single to multiple columns and merging
    By flagship in forum Excel General
    Replies: 15
    Last Post: 12-31-2012, 10:06 AM
  6. Merging multiple rows and column data for each unique ID into single row
    By skilaru in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-22-2012, 11:59 AM
  7. Merging multiple rows into a single row
    By barry_jordan in forum Excel General
    Replies: 5
    Last Post: 01-13-2012, 11:50 AM

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