+ Reply to Thread
Results 1 to 9 of 9

Concatenation Function that separates values by comma and removes duplicates

  1. #1
    Registered User
    Join Date
    10-09-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Concatenation Function that separates values by comma and removes duplicates

    I would like to start off by thanking you for your help with this. I am used Excel 2010 (PC) to aggregate the roles and responsibilities of our employees for a RACI exercise. I had our regional business managers fill in a template that indicated who performed a specific function (column Q) and the person who should be performing that function (column S). On a master template I used the following formula to aggregate all the responses:

    =CONCATENATE(Dean!O17,Galvin!O17,'Josh Crosslin'!O17,DiMarco!O17,JES!O17,Schmidt!O17,Rosiello!O17,JJD!O17,AOC!O17,'R. Myers'!O17,'R. Myers 2'!O17,'R. Tesdall'!O17,'R. Tesdall 2'!O17,'T. Ponder'!O17,Doig!O17)

    The names you see in the formula represent the individual tabs I created in the master template to reflect the results of the templates sent to the BMs. The result was:

    CDM + Planning teamCDM + Planning teamCDMCDM + Planning teamCDM + Planning team

    Is there a way I can modify this formula to show a result that is separated by commas and free of duplicates?

    Thank you

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Concatenation Function that separates values by comma and removes duplicates

    You can't use a delimiter such as a comma with the concatenate function unless you were to do
    =concatenate(Dean!O17,",",Gavin!O17,","... and so on.

    Not sure how to go about removing duplicates though.

  3. #3
    Registered User
    Join Date
    10-09-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Concatenation Function that separates values by comma and removes duplicates

    I tired that, but it yielded the following result:

    ,,,NCIM,Analytics/Insights Team,Insights + Local Teams,,AMG,AMG,,,Client and Strategic Team,Client and Strategic Team,Client and Planning Team,NCIM / CLIENT

    Not sure why there were so many ,,,

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Concatenation Function that separates values by comma and removes duplicates

    Presumably some of the cells you reference are blank. I guess you could fix that with if() functions but the formula would quickly become unwieldy. Best bet might be a user defined function.

  5. #5
    Registered User
    Join Date
    10-09-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Concatenation Function that separates values by comma and removes duplicates

    The ideal result from the formula in my original post is

    CDM + Planning team, CDM

  6. #6
    Registered User
    Join Date
    10-09-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Concatenation Function that separates values by comma and removes duplicates

    UDFs are not my specialty... I guess I need to work on that. Are there sites like codeacadmy.com where i can hone my VBA skills?

  7. #7
    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
    52,933

    Re: Concatenation Function that separates values by comma and removes duplicates

    Hi and welcome to the forum

    maybe this...
    =if(Dean!O17="","",Dean!O17&", ")&if(Galvin!O17="","",Galvin!O17&", ",)&...................
    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

  8. #8
    Registered User
    Join Date
    10-09-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Concatenation Function that separates values by comma and removes duplicates

    That worked for the excess commas, but do you have any suggestions on removing the duplicate values?

    NCIM,CDM + Planning team,CDM + NCIM + Local Team,CIM,CIM,BIM,BIM,BIM,CDM / NCIM,

  9. #9
    Registered User
    Join Date
    10-09-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Concatenation Function that separates values by comma and removes duplicates

    Thank you FDibbins

+ 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: 07-21-2013, 06:57 AM
  2. [SOLVED] Removes Duplicates Except Blanks macro
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-06-2013, 09:49 AM
  3. Macro that separates values that are in a cell
    By kurtwagner in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-03-2012, 03:24 PM
  4. comma as concatenation operator ?
    By R. Choate in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-08-2005, 12:05 AM
  5. How do I merge two spreadsheets so it removes the duplicates?
    By Megan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-10-2005, 11:06 AM

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