Deleting matching txt from SINGLE cell using VBA

  • I have been stuck on this for days so hopefully someone can help me !


    Cell B3 has text like apple, apple, banana, oranges, oranges, orange sauce


    I am trying to extract the non duplicates from Cell B3 into cell B4 (B4 should then show banana, orange sauce)


    Then I have something similar in cell B6 that i need to extract the non duplicates into B7)


    Thanks !

  • Re: Deleting matching txt from SINGLE cell using VBA


    Try this User Defined Function which is on Module1 of the attached and then use it like a regular excel function


    In B4
    =NonDuplicates(B3)



  • Re: Deleting matching txt from SINGLE cell using VBA


    Select the cells you want to run the macro against and the results will be put in the cell to the right. :cool:



    I'm not sure why that line is red, there were no errors during testing.

  • Re: Deleting matching txt from SINGLE cell using VBA


    I tried that one and it worked !!!


    Then I sent it by email ... and it did not work for the other person who opened it ... Is there a way to save it for when other people open the sheet after sending it by email ?




    Quote from sktneer;772070

    Try this User Defined Function which is on Module1 of the attached and then use it like a regular excel function


    In B4
    =NonDuplicates(B3)



  • Re: Deleting matching txt from SINGLE cell using VBA


    =Non Duplicates () worked till i sent it by email... when it was reopened by someone else it came up as #Name ... Is there a way around this or do you know why that would happen ?

Participate now!

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