Problem with function that creates an array of unqiue values

  • Ok, firstly, here's the function:



    The problem comes when one of the unique values is contained *within* another unique value.


    For example, in my column on the worksheet the unique values might be:


    FGHCAD
    DES PMO
    Admin Support
    PMO
    Tech Assist


    The problem with the function above is it effectively builds a string that (should) looks like:


    FGHCAD|DES PMO|Admin Support|PMO|Tech Assist


    Then Splits the items into an array based on the | character. Whilst this is a very good and clever solution, it has one flaw that I'm not sure how to overcome, namely that because the string "PMO" exists within the string "DES PMO", then item "PMO" never gets added. In other words the temp list ends up as:


    FGHCAD|DES PMO|Admin Support|Tech Assist


    so that when the Split happens, "PMO" doesn't get added.


    Any ideas?


    Thanks


    Also posted here: http://www.mrexcel.com/forum/e…e-values.html#post4562746

  • Re: Problem with function that creates an array of unqiue values


    Try this

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!