ISLIKE
Returns whether a particular string matches a certain pattern.
For instructions on how to add a function to a workbook refer to the page under Inserting Functions
'sText - The text you want to test.
'sPattern - The pattern you want to check.
Public Function ISLIKE(ByVal sText As String, _
ByVal sPattern As String) As Boolean
If sText Like sPattern Then
ISLIKE = True
Else
ISLIKE = False
End If
End Function
You can use the built-in COUNTIF function to achieve the same thing.
You cannot use the [] operator in your patterns if you use the COUNTIF function.
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext