+ Reply to Thread
Results 1 to 10 of 10

Check to see if a cell contains text from a list then return the corresponding text

  1. #1
    Registered User
    Join Date
    09-28-2012
    Location
    BOSTON
    MS-Off Ver
    Excel 2010
    Posts
    4

    Check to see if a cell contains text from a list then return the corresponding text

    I have a column of car manufacturers BMW, Ford, Acura, Chevorlet etc. and I also have a list of auto dealers like Bob's Ford, BMW of Anytown, or Smith Chevorlet. I want to check if the auto dealers list contains the text from my list of car manufacturers and then return the value from the list in the adjacent cell.

    So.....

    A1 A2
    Bob's Ford Formula to reference "Ford"

    Any help is appreciated. Thanks.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Check to see if a cell contains text from a list then return the corresponding text

    crousseau989,

    Welcome to the forum!
    Attached is an example workbook based on the criteria described.
    Row 1 is a header row so data starts in row 2
    Column J contains the list of auto dealers
    Column A contains the text to check for auto dealers

    In cell B2 is this formula:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

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

  3. #3
    Registered User
    Join Date
    09-28-2012
    Location
    SF, CA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Check to see if a cell contains text from a list then return the corresponding text

    Wow. I thought this was impossible in Excel, so I used a Perl script to do it. (Happy to share if interested, but if this works, no need.)

  4. #4
    Registered User
    Join Date
    09-28-2012
    Location
    BOSTON
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Check to see if a cell contains text from a list then return the corresponding text

    Quote Originally Posted by jeff g View Post
    Wow. I thought this was impossible in Excel, so I used a Perl script to do it. (Happy to share if interested, but if this works, no need.)
    Thanks for the welcome and the help. I think I was a little unclear as to what I needed. I've attached a sample spread sheet to show what I wanted the value to return. If there is a dealership named "Bob's Ford" and another one named "Ford of USA", I want the the adjacent cell to referene "Ford" from a list of car manufactuers.

    Thanks and sorry I was a bit unclear.

    car manufacturer look up.xls

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Check to see if a cell contains text from a list then return the corresponding text

    crousseau989,

    Attached is a modified version of your posted workbook. In cell B2 and copied down is this formula:
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-28-2012
    Location
    BOSTON
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Check to see if a cell contains text from a list then return the corresponding text

    Quote Originally Posted by tigeravatar View Post
    crousseau989,

    Attached is a modified version of your posted workbook. In cell B2 and copied down is this formula:
    Please Login or Register  to view this content.
    Awesome! Thanks for the help!

  7. #7
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Check to see if a cell contains text from a list then return the corresponding text

    You're very welcome

    If that takes care of your need, please mark this thread as solved.
    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:
    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  8. #8
    Registered User
    Join Date
    10-04-2012
    Location
    Vienna, Austria
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Check to see if a cell contains text from a list then return the corresponding text

    Thanks so much for these replies. The first one works perfectly for what I need. You have saved me a lot of time and frustration!!

    Best
    Rialtmann

  9. #9
    Registered User
    Join Date
    01-30-2013
    Location
    Romania
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Check to see if a cell contains text from a list then return the corresponding text

    great formula ! solved our problem as well, thank you

  10. #10
    Registered User
    Join Date
    12-21-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    28

    Re: Check to see if a cell contains text from a list then return the corresponding text

    Hello Everyone

    This formula is a great help to me also however I do have a question

    I want the result to be able to show multiple terms from the search terms and index.

    for example

    Bob's BMW and Ford

    Result would be

    BMW,Ford

    Rather than just Ford

    Is this possible?

    Any help would be greatly appreciated and beneficial

    Thanks

    Samuel

+ 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