Hello,
You may use the following formula on a worksheet:
=NOT(ISERROR(MATCH("*";$A$1:$A$10;0)))
But, "~" must be specified as "~~". For example:
=NOT(ISERROR(MATCH("~~";$A$1:$A$10;0)))
VBA functions:
Function MyMatch(ByVal lookup_value As Variant, ByVal lookup_range As Variant) As Long
On Error Resume Next
Dim index As Long
index = InStr(1, lookup_value, "~", vbBinaryCompare)
If index > 0 Then
lookup_value = Replace(lookup_value, "~", "~~")
End If
MyMatch = Application.Match(lookup_value, lookup_range, 0)
End Function
Function HasValue(ByVal lookup_value As Variant, ByVal lookup_range As Variant) As Boolean
HasValue = (MyMatch(lookup_value, lookup_range) > 0)
End Function