+ Reply to Thread
Results 1 to 4 of 4

=IF Any 2 Values in A1 Appear in C1, Then B1 ="Yes" (Search, Match, Countif, Index, ?)

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

    =IF Any 2 Values in A1 Appear in C1, Then B1 ="Yes" (Search, Match, Countif, Index, ?)

    Hi and thanks for considering my scenario.

    Column A contains cells with 2 values (letters of the alphabet) in each cell.

    The options are: AB, AC, DB, DC.

    Column C contains cells with 2-4 values in each cell.

    The options are:

    AB
    AC
    ABC
    DBC
    DA
    DC
    DAB
    DAC
    DABC

    IF CELL C1 contains any 2 of the values that appear in A1, then B1 = "Yes", otherwise leave cell blank.

    I hope this explains what I am attempting to do.

    Example: A1 = AB, C1 = AC, B1 = a blank cell.

    Example: A1 = DB, C1 = DAB, B1 = "Yes."

    Thanks again, Jon

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: =IF Any 2 Values in A1 Appear in C1, Then B1 ="Yes" (Search, Match, Countif, Index,

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: =IF Any 2 Values in A1 Appear in C1, Then B1 ="Yes" (Search, Match, Countif, Index,

    Try this in B1 copied down

    =IFERROR(IF(SEARCH(LEFT(A1,1),C1)*SEARCH(RIGHT(A1,1),C1), "Yes"),"")
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

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

    Re: =IF Any 2 Values in A1 Appear in C1, Then B1 ="Yes" (Search, Match, Countif, Index,

    To: mehmetcik and ChemistB,

    The formula you each provided was spot on. You both solved my problem. The only difference in the results was that mehmetcik's formula provided for a "yes" when A1 and C1 were empty. ChemistB's formula left B1 empty when A1 and C1 were empty. Thanks for your time and expertise, both. I appreciate your generosity. Thank you. -Jon

+ 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: 4
    Last Post: 11-17-2013, 12:05 PM
  2. [SOLVED] How do I "Index match" values that begins with desired value
    By AR-51 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-22-2013, 10:14 AM
  3. Strings Variables in Range("A1").Formula = "=index/match" ?
    By nadnerb5 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2012, 05:07 PM
  4. [SOLVED] Variable "sheet-name" and "range-name" wanted in INDEX/MATCH-function
    By Fiebuls in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-01-2012, 04:09 PM
  5. [SOLVED] Index, Match & Countif ... Use with the "Rand" function
    By traceylreed in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-30-2012, 07:48 AM
  6. Replies: 3
    Last Post: 02-16-2011, 02:55 PM
  7. How to write cell address of the match in this , =IF(COUNTIF(A:A,B1)>0,"x","")
    By sureng19 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-24-2010, 08:03 PM
  8. Replies: 2
    Last Post: 07-02-2006, 05:50 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