Hello,
I am using InStr function, but it is searching case sensititive. I want to search not case sensitive. My function is like below. Can you help?
Function ContainsText(Rng As Range, Text As String) As String
Dim T As String
Dim myCell As Range
For Each myCell In Rng
If InStr(myCell.Text, Text) > 0 Then
If Len(T) = 0 Then
T = myCell.Address(False, False)
Else
T = T & "," & myCell.Address(False, False)
End If
End If
Next myCell
ContainsText = T
End Function
Thanks in advance.
sermest
I am using InStr function, but it is searching case sensititive. I want to search not case sensitive. My function is like below. Can you help?
Function ContainsText(Rng As Range, Text As String) As String
Dim T As String
Dim myCell As Range
For Each myCell In Rng
If InStr(myCell.Text, Text) > 0 Then
If Len(T) = 0 Then
T = myCell.Address(False, False)
Else
T = T & "," & myCell.Address(False, False)
End If
End If
Next myCell
ContainsText = T
End Function
Thanks in advance.
sermest