+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : Search specific text in a string

  1. #1
    Registered User
    Join Date
    05-13-2011
    Location
    Birmingham
    MS-Off Ver
    Excel 2007
    Posts
    78

    Search specific text in a string

    Hi,
    I have 25K customer records consisting email address,Fname,Lname etc. I want to filter those email addresses having say wxy.com in their email address. I applied the following formula but did not work correctly.

    Please Login or Register  to view this content.
    This code will filter the results:
    [email protected]
    [email protected]
    [email protected]
    Last edited by nlm; 12-14-2011 at 05:40 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search specific text in a string

    Try: =IF(ISNUMBER(SEARCH("wxy.", A1)), "Found", "Not Found")
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Search specific text in a string

    Hi Nim,

    If you want to do this with Find function as shown in example:-

    Please Login or Register  to view this content.
    Regards,
    DILIPandey

    < click on below 'star' if this helps >
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Search specific text in a string

    Hi nlm

    Try this:

    =if(find("wxy.",A1),"Found","Not Found")

    Hope to helps you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Registered User
    Join Date
    11-28-2011
    Location
    vietnam
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Search specific text in a string

    Thanks ! JBeaucaire

  6. #6
    Registered User
    Join Date
    05-13-2011
    Location
    Birmingham
    MS-Off Ver
    Excel 2007
    Posts
    78

    Re: Search specific text in a string

    Thanks JBeaucaire!

    It worked. If we want to filter rows on two inputs like "wxy" and "abc" then will this formula works with OR operator?

    I appreciate your help.

  7. #7
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Search specific text in a string

    If you just have couple texts use them inside an Array like,

    =IF(COUNT(SEARCH({"wxy.","abc"},A1)),"Found","Not Found")

    Or enter all texts in a range, say in F1:F2, then use,

    =IF(ISNUMBER(LOOKUP(9E300,SEARCH(F1:F2,A1))),"Found","Not Found")
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  8. #8
    Registered User
    Join Date
    05-13-2011
    Location
    Birmingham
    MS-Off Ver
    Excel 2007
    Posts
    78

    Re: Search specific text in a string

    Thanks Haseeb!

    The first one fulfills my requirement.

    Cheers

+ 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