View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default String in a range

Perhaps something like:

Function well_is_it(sr As Range, r As Range) As Boolean
well_is_it = False
s = sr.Value
For Each rr In r
If InStr(1, rr.Value, s) 0 Then
well_is_it = True
Exit Function
End If
Next
End Function
--
Gary''s Student - gsnu200733


"Dan" wrote:

What is the Syntax to check if a string is in a range?
Thanks Dan