How to remove duplicate comma separated values within a cell

The following macro will help you remove the duplicates and give you a clean string. Function stringOfUniques(inputString As String) As String Dim inArray() As String Dim xVal As Variant Dim s As String inArray = Split(inputString, “,”) For Each xVal In inArray If InStr(s, Trim(xVal)) = 0 Then _ s = s & Trim(xVal) & “,” Next xVal stringOfUniques = s End Function Step 1: To insert a macro, If you are using a Mac, click fn+alt+F11, This is how you can open a macro screen, Step 2:  Paste the above…

Read More