Hi,
Excel.PNG
Hi, i want to split the string in column A to only show the numbers separated by a comma with removing duplicates. All the ID's start with 1080..
this is what i have tried so far...
Dim ws As Worksheet
Dim LastRow As Long, i As Long
Dim tmpArray() As String
Dim rng As Range, rF As Range
'~~> This is the relevant sheet
Set ws = ActiveWorkbook.Sheets("Square")
With ws
LastRow = .Range("C" & .Rows.Count).End(xlUp).Row
For i = 2 To LastRow
If InStr(1, .Range("C" & i).Value, "1080* ") Then
tmpArray = Split(.Range("C" & i).Value, "")
.Range("D" & i).Value = tmpArray(0)
'
End If
Next i
End With
The wild card 1080* doesn't work in InStr. The output should show as the values in the above picture attached.
Thanks,
Bookmarks