Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need some help with IS LIKE Function

Status
Not open for further replies.

ribhead

Technical User
Jun 2, 2003
384
US
I am just trying to learn how this ISLIKE function works so if you could look at what I have below please let me know why I am getting a Sub of Function not Defined alarm.

Sub dude()
Dim mysearch As String
Dim lrow As Long
Dim r As Integer
Dim n As Integer
lrow = Rows.Cells(Rows.count, 1).End(xlUp).Row
n = 1
r = 1
Do
mysearch = Cells(n, 1).Value
If ISLIKE(" S", "[mysearch]") Then
Cells(r, 4).Value = mysearch
r = r + 1
Else
n = n + 1
End If
Loop Until n = lrow + 1
End Sub

For just $19.95 you too can have a beautiful smile.
 
ribhead,

Where did ISLIKE come from? Do you have an AddIn? What does the documentation say about using this function?

Here's the Like Operator...
Code:
mysearch = Cells(n, 1).Value
If mysearch Like "* S*" Then
....
Else
....
End If
:)

Skip,
Skip@TheOfficeExperts.com
 
Hey Skip I have a book by John Walkenbach Excel 2000 Power Programming with VBA. In the book there are some examples but it never said anything about being an Addin.

Here are the examples that are in the book.

=ISLIKE("guitar","g*") This formula returns true because * matches any number of characters. It returns True if the first argument is any text that begins with "g".

=ISLIKE("Unit1","Unit?") This formula returns true because ? matches any single character. If the first argument were "Unit12", the function would return False.

Make any sense to you?

For just $19.95 you too can have a beautiful smile.
 
Hey Skip sorry for the confusion but I'm pretty sure that this is a Worksheet Function and not a VBA function. Thanks for the info on the LIKE Function though.

For just $19.95 you too can have a beautiful smile.
 
PUP? Never heard of it of course I'm new to VBA. I appreciate the knowledge your droppin'thanks a bunch Skip for your time.

For just $19.95 you too can have a beautiful smile.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top