+ Reply to Thread
Results 1 to 6 of 6

NEED HELP with combining two cell string values and removing duplicate String values....

  1. #1
    Registered User
    Join Date
    11-02-2012
    Location
    tdot, cANs
    MS-Off Ver
    Excel 2010
    Posts
    3

    NEED HELP with combining two cell string values and removing duplicate String values....

    I am trying to figure out how to do this and its really frustrating.

    This is what i have in two different Cells

    cell 1: "w1,w2,w3"
    cell 2: "w2,w8,w6"



    I want to combine cell 1 and cell 2 and remove duplicate string values...

    This is the result i want
    Cell:"w1,w2,w3,w8,w6"

    can someone please help me solve this issue?

    -Amrit

  2. #2
    Registered User
    Join Date
    10-30-2012
    Location
    Modlin , Poland
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    42

    Re: NEED HELP with combining two cell string values and removing duplicate String values..

    hello
    for this particular case I have this solution

    hope is helpful
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-02-2012
    Location
    tdot, cANs
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: NEED HELP with combining two cell string values and removing duplicate String values..

    katiespirations thank you for your quick response.


    After looking at your sample file I see that your solution does work. However in my exact situation, the mid function has some limitations since I don't have a fixed set of numbers or a fixed number of characters in the length...

    for example,

    cell 1: "wx41 , w2 , w36 , r398-45"
    cell 2: "w2 , x348-9d88 , w36"


    This is the result I want
    Cell:"w2 , w36 ,x348-9d88 ,wx41 , r398-45"

    Is there a way to have it automatically find the character length and location in the string when using the MID function? or may be you would recommend a different solution?

  4. #4
    Registered User
    Join Date
    10-30-2012
    Location
    Modlin , Poland
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    42

    Re: NEED HELP with combining two cell string values and removing duplicate String values..

    hi again,

    maybe macro is better solution,unfortunately I am not so confident about that, the only thing I have for now is sth like in the attachment
    to run macro pres ctrl+b
    I now is not perfect but you can see and we can work on it
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-02-2012
    Location
    tdot, cANs
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: NEED HELP with combining two cell string values and removing duplicate String values..

    Hi again,

    Thank you for all your help. I found the solution to help me with this situation exactly the way I needed it to. I had to create a module in excel to do it.

    1) hit Alt + F11 to open VB editor
    2) Go to [Insert] - [Module] then paste the code
    3) hit Alt + F11 again to get back to Excel


    Use in cell like =CustomGT(A1, ",")


    CODE BELOW

    Please Login or Register  to view this content.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: NEED HELP with combining two cell string values and removing duplicate String values..

    I have marked this thread solved for you.
    In the future please select Thread Tools from the menu above and mark the thread as solved. Thanks.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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