i have having sort of an "off day"... i just cant seem to figure out how to add code to make the search non-case sensitive.
it all is good if i by chance type the search criteria in the correct case. if not, it will not be found....
below is my code
ideas pls?
Sub HighlightSearchResult()
Dim strTest As String
Dim strLen As Integer
strTest = Range("M1")
strLen = Len(strTest)
For Each cell In Range("E1:H100")
If InStr(cell, strTest) > 0 Then
cell.Characters(InStr(cell, strTest), strLen).Font.Color = vbGreen
End If
Next
End Sub
it all is good if i by chance type the search criteria in the correct case. if not, it will not be found....
below is my code
ideas pls?
Sub HighlightSearchResult()
Dim strTest As String
Dim strLen As Integer
strTest = Range("M1")
strLen = Len(strTest)
For Each cell In Range("E1:H100")
If InStr(cell, strTest) > 0 Then
cell.Characters(InStr(cell, strTest), strLen).Font.Color = vbGreen
End If
Next
End Sub