+ Reply to Thread
Results 1 to 4 of 4

What's the best way to merge rows with a common field?

  1. #1
    Registered User
    Join Date
    03-28-2017
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    2

    Question What's the best way to merge rows with a common field?

    I have a table that has rows that have identical field contents(name, address, zip) except for the last two fields which contain a question and an answer(columns H & J). About every 5 rows the identical data changes (to a new name, address, zip).

    I want to create a new table where row 1 has the identical fields (name, address, zip) followed by the non identical information on the same row, H & J(1), H & J(2), H & J(3).

    So instead of this:

    Mary Jane, 234 Lost Lane, Paris, Tx, Q1, Q2
    Mary Jane, 234 Lost Lane, Paris, Tx, Q3, Q4
    Mary Jane, 234 Lost Lane, Paris, Tx, Q5, Q6
    Mary Jane, 234 Lost Lane, Paris, Tx, Q7, Q8
    Mary Jane, 234 Lost Lane, Paris, Tx, Q9, Q10
    Joe Smith, 1201 Texas Ave, Justin, Tx, Q1, Q2
    Joe Smith, 1201 Texas Ave, Justin, Tx, Q3, Q4
    Joe Smith, 1201 Texas Ave, Justin, Tx, Q5, Q6
    Joe Smith, 1201 Texas Ave, Justin, Tx, Q7, Q8
    Joe Smith, 1201 Texas Ave, Justin, Tx, Q9, Q10

    I want this:

    Mary Jane, 234 Lost Lane, Paris, Tx, Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9, Q10
    Joe Smith, 1201 Texas Ave, Justin, Tx, Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9, Q10

    What is the best way to accomplish for a table of 500+ rows?

  2. #2
    Forum Contributor
    Join Date
    12-18-2016
    Location
    London
    MS-Off Ver
    Microsoft 2013
    Posts
    145

    Re: What's the best way to merge rows with a common field?

    Let’s refer to article in the following thread which discusses about a similar and see if it helps
    Last edited by FDibbins; 03-28-2017 at 04:11 PM. Reason: link deleted by admin

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: What's the best way to merge rows with a common field?

    Amanda, we prefer that you answer the question here, not just supply a link to another site. Use a link to assist in your explanation if needed
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    03-28-2017
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    2

    Re: What's the best way to merge rows with a common field?

    One thing to note is that all these rows are in one table so I'm not merging two tables. I'm merging information from 5 rows into 1 and eliminating duplicate information.

    I'd love to do this within Excel without having to resort to visual basic programming which I know little about.

+ 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. Group Fields in Mail merge based on common field
    By Sinon05 in forum Word Formatting & General
    Replies: 2
    Last Post: 03-04-2016, 01:46 AM
  2. Merge Filtered Rows with Common ID
    By hermes980 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-26-2014, 02:54 PM
  3. Replies: 12
    Last Post: 09-17-2013, 10:55 PM
  4. Merge multiple rows with one common cell
    By seanant in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-16-2013, 04:24 AM
  5. Compressing multiple rows down to one row by using a common field
    By feno_uk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-05-2013, 03:11 PM
  6. Merge multiple spreadsheets with common field
    By sbarry50 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-19-2010, 11:42 AM
  7. Merge 2 Worksheets; One Common Field
    By sheisgeeky in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-30-2008, 01:26 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