+ Reply to Thread
Results 1 to 4 of 4

Lookup certain text within a cell, PLEASE HELP!

  1. #1

    Lookup certain text within a cell, PLEASE HELP!

    There is a source cell that can contain any combination of AA, BB, HH,
    and other 2 letter text separated by commas.
    For example cell A1 can have "AA, HH"
    cell b2 can have "AA, BB, HH"
    I want to set up a formula so that another cell can check cell a1 or b2
    and see if "AA" is found in that cell and if it does, to return a "1".
    If the cell does not have "AA" in it then it would return a "0." Is
    this at all possible? Thanks!


  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Thumbs up

    Quote Originally Posted by [email protected]
    There is a source cell that can contain any combination of AA, BB, HH,
    and other 2 letter text separated by commas.
    For example cell A1 can have "AA, HH"
    cell b2 can have "AA, BB, HH"
    I want to set up a formula so that another cell can check cell a1 or b2
    and see if "AA" is found in that cell and if it does, to return a "1".
    If the cell does not have "AA" in it then it would return a "0." Is
    this at all possible? Thanks!
    Hello asimpleman,

    If your AA are always the left most characters, then if your item is in A1

    B1 should have this

    =IF(LEFT(A1,2)="AA",1,0)

    oldchippy

  3. #3
    asimpleman
    Guest

    Re: Lookup certain text within a cell, PLEASE HELP!

    oldchippy- thanks very much you solved part of my problem!
    I dont think i was clear enough in my question. In addition to finding
    "AA" and returnign a "1" or "0", I also need to check to see if BB, HH
    or any other two letter combination is found in a cell.
    So if the cell includes "BB, HH, CC" I would want to be able to check
    if the cell includes bb and then retrun a result, then check if the
    cell has hh, and return this result in a different cell. each result
    checking for one specific two letter combination. i know this is not as
    clear as can be, but hopefully someone will be able to help me!
    Thanks!!
    oldchippy wrote:
    > [email protected] Wrote:
    > > There is a source cell that can contain any combination of AA, BB, HH,
    > > and other 2 letter text separated by commas.
    > > For example cell A1 can have "AA, HH"
    > > cell b2 can have "AA, BB, HH"
    > > I want to set up a formula so that another cell can check cell a1 or
    > > b2
    > > and see if "AA" is found in that cell and if it does, to return a "1".
    > > If the cell does not have "AA" in it then it would return a "0." Is
    > > this at all possible? Thanks!

    > Hello asimpleman,
    >
    > If your AA are always the left most characters, then if your item is in
    > A1
    >
    > B1 should have this
    >
    > =IF(LEFT(A1,2)="AA",1,0)
    >
    > oldchippy
    >
    >
    > --
    > oldchippy
    > ------------------------------------------------------------------------
    > oldchippy's Profile: http://www.excelforum.com/member.php...o&userid=19907
    > View this thread: http://www.excelforum.com/showthread...hreadid=569896



  4. #4
    Bob Phillips
    Guest

    Re: Lookup certain text within a cell, PLEASE HELP!

    Put the letter combinations in say B1,C1,D1, etc.

    In B2, enter

    =--LEFT(A2,2)=B$1

    and copy across

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "asimpleman" <[email protected]> wrote in message
    news:[email protected]...
    > oldchippy- thanks very much you solved part of my problem!
    > I dont think i was clear enough in my question. In addition to finding
    > "AA" and returnign a "1" or "0", I also need to check to see if BB, HH
    > or any other two letter combination is found in a cell.
    > So if the cell includes "BB, HH, CC" I would want to be able to check
    > if the cell includes bb and then retrun a result, then check if the
    > cell has hh, and return this result in a different cell. each result
    > checking for one specific two letter combination. i know this is not as
    > clear as can be, but hopefully someone will be able to help me!
    > Thanks!!
    > oldchippy wrote:
    > > [email protected] Wrote:
    > > > There is a source cell that can contain any combination of AA, BB, HH,
    > > > and other 2 letter text separated by commas.
    > > > For example cell A1 can have "AA, HH"
    > > > cell b2 can have "AA, BB, HH"
    > > > I want to set up a formula so that another cell can check cell a1 or
    > > > b2
    > > > and see if "AA" is found in that cell and if it does, to return a "1".
    > > > If the cell does not have "AA" in it then it would return a "0." Is
    > > > this at all possible? Thanks!

    > > Hello asimpleman,
    > >
    > > If your AA are always the left most characters, then if your item is in
    > > A1
    > >
    > > B1 should have this
    > >
    > > =IF(LEFT(A1,2)="AA",1,0)
    > >
    > > oldchippy
    > >
    > >
    > > --
    > > oldchippy
    > > ------------------------------------------------------------------------
    > > oldchippy's Profile:

    http://www.excelforum.com/member.php...o&userid=19907
    > > View this thread:

    http://www.excelforum.com/showthread...hreadid=569896
    >




+ 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