Simple version:
Function StringCompare(r1 As Range, r2 As Range) As Boolean
Dim varData As Variant
Dim lngMatch As Long
Dim i As Integer, bDiff As Boolean
Dim strTest As String
strTest = r2.Value & ","
varData = Split(r1.Value, ",")
For i = LBound(varData) To UBound(varData)
lngMatch = InStr(1, strTest, Trim(varData(i)) & ",", vbTextCompare)
If lngMatch > 0 Then
With r2.Characters(lngMatch, Len(Trim(varData(i)))).Font
.Bold = True
.Size = 9
.Color = RGB(255, 0, 0)
End With
bDiff = True
End If
Next i
StringCompare = bDiff
End Function
Bookmarks