+ Reply to Thread
Results 1 to 3 of 3

Search text inside a string

  1. #1
    Registered User
    Join Date
    01-25-2004
    Posts
    30

    Search text inside a string

    Hi all
    is there any easy way to implement this :

    IF (target_string contains searched_string) then say ("ok")
    ELSE say ("not ok")

    in a cell ?
    I though it was a very easy thing,
    so I was coding :
    IF (FIND("this text","text"),"fine","not good")

    but then I realize that FIND returns #VALUE if it doesn't find the searched_string, an I don't know how to manage it

    IF (FIND("this txt","text"),"fine","not good") ==> #VALUE!

    thanks in advance
    *pimar

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,963
    IF(ISERROR(FIND("this text","text")),"not good","FOUND")
    Ben Van Johnson

  3. #3
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    If you are looking for a function to find word in word ...
    Please Login or Register  to view this content.
    In your VBE, you also need to tick off Tools Referrences
    Microsoft VBScript Regular Expressions 1.0

    HTH
    Carim

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1