+ Reply to Thread
Results 1 to 5 of 5

IF Any Of These Values Appear in A1, Then "Yes"

  1. #1
    Registered User
    Join Date
    04-29-2013
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2010
    Posts
    50

    IF Any Of These Values Appear in A1, Then "Yes"

    Hi, and thanks for taking a look at this problem. I think I am looking at =IFERROR(IF(SEARCH(LEFT.... etcetera, but I am stuck.


    Cell A1 contains four characters, WXYZ. Cell B1 contains two characters, X3. Cell C1 should result in "Yes" since the character "X" appears in both A1 and B1.

    Cell A2 contains four characters, 2468. Cell B2 contains two characters, X3. Cell C2 should remain empty since neither characters "X" or "3" appears in both A1 and B1.

    Only ONE similar character should result in "Yes." Not all characters have to appear in A1 and B1. Any similar character will result in "Yes."


    Thanks for considering a solution to my problem.

    Regards, Jon

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,427

    Re: IF Any Of These Values Appear in A1, Then "Yes"

    Put this formula in C1:

    =IF(OR(ISNUMBER(SEARCH(LEFT(B1),A1)),ISNUMBER(SEARCH(RIGHT(B1),A1))),"yes","")

    then copy down as required.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    04-29-2013
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: IF Any Of These Values Appear in A1, Then "Yes"

    Yeah, Pete! You nailed it. Yours was the magic answer. Thanks for taking the time to help! You're awesome!

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,427

    Re: IF Any Of These Values Appear in A1, Then "Yes"

    Glad to be of help - thanks for the rep.

    Pete

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: IF Any Of These Values Appear in A1, Then "Yes"

    Here's another one...

    =IF(COUNT(SEARCH(MID(B1,{1,2},1),A1)),"Yes","")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 01-21-2015, 09:46 PM
  2. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  3. [SOLVED] Formula needed to display "Pass" or "Fail" if a column contains any values other than "yes
    By andreindy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-26-2013, 05:49 PM
  4. Replies: 0
    Last Post: 01-09-2013, 06:52 PM
  5. Replies: 3
    Last Post: 02-16-2011, 02:55 PM
  6. Setting values for "TRUE","FALSE" and "#REF!"
    By Hurtige in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-11-2006, 07:31 AM
  7. Changing "returned" values from "0" to "blank"
    By LATATC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-20-2005, 12:05 PM

Tags for this Thread

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