+ Reply to Thread
Results 1 to 5 of 5

Search string in multiple cells

  1. #1
    Registered User
    Join Date
    02-06-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    2

    Search string in multiple cells

    I have a set of cells that have a value of letters in them, say "PM123" in cell D1. I want to compare that value to multiple cells, say in A1, B1 and C1, and see if it is in there.

    However I want to search if it's partially in there, so if "PM123" is what i am looking for in cell D1, i want it to be found if it is in B1 as "ZZZPM123XXX", and the same true if it is cell A1 or C1...

    Any ideas? i have tried find, iserror, if statements, none of which i can get to work with multiple cells, searching only part of the cell, and alpha chars.

    Thanksin advance for any and all help!

  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 string in multiple cells

    Try this formula:

    =ISNUMBER(MATCH("*" & D1 & "*", A1:C1, 0))
    _________________
    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
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Search string in multiple cells

    Hi

    try
    Please Login or Register  to view this content.
    rylo

  4. #4
    Registered User
    Join Date
    02-06-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Search string in multiple cells

    Thank you very much JB and Rylo!!!! Both of your formulas worked! JB yours returns a true/false, and Rylo yours returns a 1/0 definition. BOTH will come in very handy for this situation! thank you again both for your time!

  5. #5
    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 string in multiple cells

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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