I have this Macro that works great. Problem I am now noticing is that it is case sensitive. So, CAT vs. cat is showing as "No Match". This Macro has worked for what I needed it to do, but, now have the need for it to not be case sensitive. I need it to show CAT vs. cat is a Match and not a No Match. Can someone please provide how to not make it case sensitive. I appreciate all the support from this Forum.
Sub Compare()
Dim Rng As Range, Dn As Range, Sp As Variant, S As Variant
Dim Txt1 As String, Txt2 As String
Dim i As Long
Set Rng = Range(Range("A2"), Range("A" & Rows.Count).End(xlUp))
For Each Dn In Rng
Txt1 = Replace(Dn.Value, " ", "")
Txt2 = Replace(Dn.Offset(, 1).Value, " ", "")
Sp = Split(Txt1, ";")
For i = LBound(Sp) To UBound(Sp)
If Not InStr(Txt2, Trim(Sp(i))) > 0 Then
Dn.Offset(, 2) = "No Match"
Exit For
End If
Dn.Offset(, 2) = "Match"
Next
Next Dn
End Sub
Sub Compare()
Dim Rng As Range, Dn As Range, Sp As Variant, S As Variant
Dim Txt1 As String, Txt2 As String
Dim i As Long
Set Rng = Range(Range("A2"), Range("A" & Rows.Count).End(xlUp))
For Each Dn In Rng
Txt1 = Replace(Dn.Value, " ", "")
Txt2 = Replace(Dn.Offset(, 1).Value, " ", "")
Sp = Split(Txt1, ";")
For i = LBound(Sp) To UBound(Sp)
If Not InStr(Txt2, Trim(Sp(i))) > 0 Then
Dn.Offset(, 2) = "No Match"
Exit For
End If
Dn.Offset(, 2) = "Match"
Next
Next Dn
End Sub