+ Reply to Thread
Results 1 to 5 of 5

Locating duplicate entries and concatenating adjacent values

  1. #1
    Registered User
    Join Date
    07-16-2010
    Location
    Riverdale, Georgia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Locating duplicate entries and concatenating adjacent values

    Hello, I had a bit of an odd question.

    I have a worksheet that has two columns, one (column A) is a number. The second one (column B), is a name.

    What I was wondering is if there was a formula that would go through, see where the name was the same, then concatenate the values where the name also matched (column C), such as:

    A | B | C
    1 Bob Smith 1,2
    2 Bob Smith 1,2
    3 Jane Smith 3,4,5
    4 Jane Smith 3,4,5
    5 Jane Smith 3,4,5

    Any help is much-appreciated. Thanks!
    Last edited by justinwright; 03-30-2011 at 01:25 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Locating duplicate entries and concatenating adjacent values

    If you add this UDF to your VB editor (ALT+F11, INSERT|MODULE)

    Please Login or Register  to view this content.
    Then you can use this formula:

    Please Login or Register  to view this content.
    confirm it with CTRL+SHIFT+ENTER keys not just ENTER and copy down.

    assumes data is in A1:B5
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-16-2010
    Location
    Riverdale, Georgia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Locating duplicate entries and concatenating adjacent values

    So if the list was say, A1 to A3500, the module wouldn't change? Just the formula used?

    Also, if I may trouble you to ask, what is the Ctrl+Shift+Enter for?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Locating duplicate entries and concatenating adjacent values

    Yes, only the formula would change... but the more cells in the range and the more times the formula is used, the less efficient the worksheet gets, because this in an array formula.

    The CTRL+SHIFT+ENTER identifies the formula as an ARRAY formula and makes EXCEL process the formula as such. Array Formulas

  5. #5
    Registered User
    Join Date
    07-16-2010
    Location
    Riverdale, Georgia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Locating duplicate entries and concatenating adjacent values

    It worked perfectly, I'll mark this thread solved.

    Thank you so much!

    Also, wow at how fast I got a solution on here, I love this forum now!

+ 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