Sub ft()
Dim rng As Range, s$, cel As Range, c%
Set rng = [E1:E2]
s = UCase([A1])
For Each cel In rng
If InStr(1, s, UCase(cel)) <> 0 Then
c = 1
Exit For
End If
Next
MsgBox IIf(c = 1, "Yes", "No")
End Sub
[table="width: 500"]
[tr]
[td]Function FindTxts(SingleCell As Range, RangeOfCells As Range) As Variant
Dim Cel As Range
For Each Cel In RangeOfCells
FindTxts = FindTxts + (InStr(1, SingleCell, Cel.Value, vbTextCompare) > 0)
Next
If FindTxts Then FindTxts = "Yes" Else FindTxts = "No"
End Function[/td]
[/tr]
[/table]
Code:Sub ft() Dim rng As Range, s$, cel As Range, c% Set rng = [E1:E2] s = UCase([A1]) For Each cel In rng If InStr(1, s, UCase(cel)) <> 0 Then c = 1 Exit For End If Next MsgBox IIf(c = 1, "Yes", "No") End Sub
See if this function works for you...
Code:[TABLE="width: 500"] <tbody>[TR] [TD]Function FindTxts(SingleCell As Range, RangeOfCells As Range) As Variant Dim Cel As Range For Each Cel In RangeOfCells FindTxts = FindTxts + (InStr(1, SingleCell, Cel.Value, vbTextCompare) > 0) Next If FindTxts Then FindTxts = "Yes" Else FindTxts = "No" End Function[/TD] [/TR] </tbody>[/TABLE]