Hi,
like this or the other way around? For the other way you have to define a separation string like a comma or a space, but try
Sub RemoveDuplicateWords()
Dim i As Long
With ActiveSheet
For i = 1 To .Cells(.Rows.Count, 1).End(xlUp).Row 'from row 1 to last row with data
If InStr(.Cells(i, 3).Value, .Cells(i, 1).Value) > 0 Then
.Cells(i, 3).Value = Trim(Replace(.Cells(i, 3).Value, .Cells(i, 1).Value, vbNullString))
End If
If InStr(.Cells(i, 3).Value, .Cells(i, 2).Value) > 0 Then
.Cells(i, 3).Value = Trim(Replace(.Cells(i, 3).Value, .Cells(i, 2).Value, vbNullString))
End If
Next i
End With
End Sub
Bookmarks