+ Reply to Thread
Results 1 to 6 of 6

Search text within string

Hybrid View

  1. #1
    Registered User
    Join Date
    03-26-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    19

    Search text within string

    Column A

    YSE PANEL CTRL SSS N1 HP
    SSS 14L-50B W/600 AMP CB

    I would like to search for the text "sss" in a column of strings

    Part Type is an array of the Column A

    ISNUMBER(SEARCH("sss",Part_Type)). This returns a number if it finds the text "sss" in any of the strings. I would like it to return an error (not found) if it sees the text "cntrl" in the any of strings even if the string also contains "sss"

  2. #2
    Spammer
    Join Date
    12-01-2011
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Excel 2003:2010
    Posts
    14

    Re: Search text within string

    =IF(ISNUMBER(SEARCH("CTRL",Part_Type)),"Not Found",ISNUMBER(SEARCH("sss",Part_Type)))

    I Typed "CTRL" instead of "cntrl" on a hunch. Search is case in-sensitive.

    How is Part_Type defined?

  3. #3
    Registered User
    Join Date
    03-26-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Search text within string

    @ a31185
    the formula you typed will still return value in A1 which contains both ctrl and sss. If it contains both I would like for the ISNUMBER function to return an error (#NA)

  4. #4
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Search text within string

    Hi
    Try this:

    samikusi.xlsm
    Click *, if my suggestion helps you. Have a good day!!

  5. #5
    Registered User
    Join Date
    03-26-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Search text within string

    @jraj1106. Thank you for the reply
    The functionality I am requesting will be part of another formula which I am not using VB. so this code in VB will not work

  6. #6
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Search text within string

    Search is case insensitive

    Find is case sensitive

    Each has its uses.
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

+ 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