I want to check if the string contains a particular word, say, string "World" doesn't
have "ed". What the operator shall I use here? Thanks.
David
I want to check if the string contains a particular word, say, string "World" doesn't
have "ed". What the operator shall I use here? Thanks.
David
Try this ...Originally Posted by yangyh
=iserror(search("ed",A1))
where A1 contains the string that you want to search.
Regards.
BenjieLop
Houston, TX
Thank you. I could not find the SEARCH function in VBA help.
Could you tell me the syntex? Thanks.
David
In VBA you can use the InStr function, like
If InStr(1, TheString, "World") > 0 Then
MsgBox "The string exists in there"
End If
--
Regards,
Juan Pablo González
Excel MVP
"yangyh" <[email protected]> wrote in
message news:[email protected]...
>
> Thank you. I could not find the SEARCH function in VBA help.
> Could you tell me the syntex? Thanks.
>
> David
>
>
> --
> yangyh
> ------------------------------------------------------------------------
> yangyh's Profile:
> http://www.excelforum.com/member.php...o&userid=26883
> View this thread: http://www.excelforum.com/showthread...hreadid=465743
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks