+ Reply to Thread
Results 1 to 4 of 4

IF cell contains TEXT from [RANGE] = TRUE

  1. #1
    Registered User
    Join Date
    02-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Question IF cell contains TEXT from [RANGE] = TRUE

    Hey guys,

    So, I'm trying to check if a certain Cell contains any values that appear in a range of cells.

    To break it down:
    In A1:A24 there are a list of strings, one per cell (which I might add to later!)
    In B1 there is a string.
    In C1 I would like to check if B1 has a string that is the same as any one of the cells in range A1:A24

    Ideas?


    Thanks,
    Tom
    Last edited by tomshanan; 04-12-2013 at 02:36 AM.

  2. #2
    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: IF cell contains TEXT from [RANGE] = TRUE

    Perhaps

    =IFERROR(LOOKUP(2^15,SEARCH(a1:a24,b1),b1),"")
    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.

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: IF cell contains TEXT from [RANGE] = TRUE

    hi Tom, welcome to the forum. looks like COUNTIF can help you.
    this counts how many times B1 appears in A1:A24.
    =COUNTIF(A1:A24,B1)

    this counts how many times B1 is contained inside A1:A24
    =COUNTIF(A1:A24,"*"&B1&"*")

    if you need a TRUE or FALSE statement, then:
    =COUNTIF(A1:A24,B1)>0

    extend range if needed

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    02-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: IF cell contains TEXT from [RANGE] = TRUE

    Thank you both!
    I used
    =COUNTIF(A1:A24,B1)>0

    Cheers!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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