+ Reply to Thread
Results 1 to 18 of 18

Concatenating Rows with Duplicate Data and Removing

  1. #1
    Registered User
    Join Date
    05-21-2015
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    9

    Concatenating Rows with Duplicate Data and Removing

    Hello,

    First off - I am using 2013 excel and I am trying to combine a rows into one cell while removing the duplicate data. I have attached an example of what I am trying to accomplish here.

    At the top of my spreadsheet I have the current data where there are multiple rows that have the same employee but in column H they have separate benefit plans. What I would like to do is have the system search for the Employee ID number and then combine the different benefit plans. After it combines column H, it can then delete the duplicate rows.

    The yellow highlighted data is what the end results would look like.

    I'm not good at writing Macros so any help would be great!

    Thanks,
    Tim
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Concatenating Rows with Duplicate Data and Removing

    Please Login or Register  to view this content.
    Last edited by daffodil11; 05-21-2015 at 02:50 PM.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Concatenating Rows with Duplicate Data and Removing

    Alternatively:

    Please Login or Register  to view this content.
    !If all your troubles are solved, then so is the thread. Show this by marking it so using thread tools at the top of the page.
    If I helped do this, then please show your appreciation by awarding rep points.
    <------ Button for that is over there

  4. #4
    Registered User
    Join Date
    05-21-2015
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    9

    Re: Concatenating Rows with Duplicate Data and Removing

    Daffodill11- thank you so much for your fast response. Favor to ask, would you be able to re-write this Macro with the my data's correct columns? When I was creating my sample data I cut out some of the fields that feed over to my spreadsheet. I was hoping I could figure out the macro to put the correct cells in myself, boy was I wrong All columns are on the new attachment, so column 'N' would be the row to concatenate and 'A' is the duplicate data.

    Thanks again,
    Tim
    Attached Files Attached Files

  5. #5
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Concatenating Rows with Duplicate Data and Removing

    Sure. H2:H15 becomes N2:N15, and the single Cells(cell,8) references becomes Cells(cell,14)

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-21-2015
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    9

    Re: Concatenating Rows with Duplicate Data and Removing

    Awesome! Thank you so much for your help today

  7. #7
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Concatenating Rows with Duplicate Data and Removing

    No problem. Always up for a challenge.

    ARowbot's code was technically more efficient, he concatenated all matches, and then purged the duplicates.
    I selectively chose rows to concatenate and got rid of the ones I didn't.

  8. #8
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Concatenating Rows with Duplicate Data and Removing

    Hi..

    Here's another just for fun...

    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    05-21-2015
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    9

    Re: Concatenating Rows with Duplicate Data and Removing

    Hi, its me again! So this month I changed my report to have less columns however when I tried running the macro that was provided last month it didn't pull the correct information into the correct field. I did change the "N" to "k" but that did not work. So I was wondering if you could help me out again.

    I am looking to combine column "K" and then remove the duplicate rows of the same employee. In my example, I have the current data listed and then what I want it to look like after the macro runs.

    Thanks for your help! ... again
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    05-21-2015
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    9

    Re: Concatenating Rows with Duplicate Data and Removing

    Hi, I was wondering if anyone would be able to help me with this macro (post on 6/17/15).

    Thanks!

  11. #11
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Concatenating Rows with Duplicate Data and Removing

    Hi, I was wondering if anyone would be able to help me with this macro (post on 6/17/15).
    Considering the fact that you didn't even respond to my solution.. in any way.. I think not.

  12. #12
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Concatenating Rows with Duplicate Data and Removing

    Sorry, I've been camping for a while.

    I am a little thrown off by your expected results; you show 2 unique employees bu there are actually 4 unique employees in your dataset.

    Using ARowbot's code with slight modification:

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    05-21-2015
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    9

    Re: Concatenating Rows with Duplicate Data and Removing

    apo, I didn't mean to offend you... sorry...

  14. #14
    Registered User
    Join Date
    05-21-2015
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    9

    Re: Concatenating Rows with Duplicate Data and Removing

    Daffodill11, thank you for the response and hopefully you had a great time camping. When I plug this macro into my excel document it combines the associate profiles correctly but is not concatenating the correct information. I am needing the "Benefit Plan" column combined, currently this combines the "Benefit Type".

    Thanks!
    Tim

    Quote Originally Posted by daffodil11 View Post
    Sorry, I've been camping for a while.

    I am a little thrown off by your expected results; you show 2 unique employees bu there are actually 4 unique employees in your dataset.

    Using ARowbot's code with slight modification:

    Please Login or Register  to view this content.

  15. #15
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Concatenating Rows with Duplicate Data and Removing

    You just need to change the three 9's to match the column you need.

    Use 8 instead.

  16. #16
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,552

    Re: Concatenating Rows with Duplicate Data and Removing

    husakt,

    If you want the result without deleting original data then use
    Please Login or Register  to view this content.
    Otherwise
    Please Login or Register  to view this content.
    Doesn't need to sort the data before you run.

  17. #17
    Registered User
    Join Date
    05-21-2015
    Location
    USA
    MS-Off Ver
    MS Office 2013
    Posts
    9

    Re: Concatenating Rows with Duplicate Data and Removing

    Thank you everyone for your responses, I was able to get that last one to work! Thanks again!

  18. #18
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,552

    Re: Concatenating Rows with Duplicate Data and Removing

    If that takes care of your original question, select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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: 1
    Last Post: 04-09-2015, 08:30 PM
  2. [SOLVED] Removing Duplicate rows of data
    By dking041966 in forum Excel General
    Replies: 0
    Last Post: 03-26-2015, 11:58 AM
  3. Removing rows of data that include a specific cell of duplicate info...
    By HanTuco in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-17-2013, 05:57 PM
  4. [SOLVED] Removing duplicate rows and combining unique data
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-19-2006, 07:10 AM
  5. Replies: 1
    Last Post: 04-01-2005, 07:06 PM

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