+ Reply to Thread
Results 1 to 6 of 6

If value found in column A return same row value in column B

  1. #1
    Registered User
    Join Date
    10-09-2006
    Posts
    36

    If value found in column A return same row value in column B

    I'm trying to search column A for a term.
    If it is found in A41 then return B41, A194 then return B194 so return the same row the term is found in column A is used to get the result in column B if not found return "FALSE"

    A B
    1 Tom Jones Good Guy
    2 Steve Smith Bad Guy
    3 Dave Williams OK Guy

    Formula should search column A for "Steve Smith", when found in A2 then return same row 2 column B value "Bad Guy" if not found return "FALSE"

    Thanks in advance!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: If value found in column A return same row value in column B

    Try these:

    =IFERROR(VLOOKUP("Steve Smith", A:B, 2, 0), "False")

    =IFERROR(INDEX(B:B, MATCH("Steve Smith", A:A, 0)), "False")
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-09-2006
    Posts
    36

    Re: If value found in column A return same row value in column B

    =IFERROR(INDEX(B:B, MATCH("Steve Smith", A:A, 0)), "False") kinda sorta works for what I'm doing, however

    I need the lookup of Steve Smith in column A to be "contains Steve Smith", not an exact match to Steve Smith.

    So if A2 were Buy Steve Smith a car Steve Smith is indeed contained in A2 so return B2

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: If value found in column A return same row value in column B

    Add wild cards *steve smith*
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    10-09-2006
    Posts
    36

    Re: If value found in column A return same row value in column B

    Well it's actually a cell and *A2* won't work. So really in that formula I need to be specifying A2 not necessarily the words "Steve Smith"


    Something like =IFERROR(INDEX(B:B, MATCH(C4, A:A, 0)), "False")

    So the value in C4 is searched in column A, with whatever row it finds C2 in it returns that row's value in column B
    Last edited by theblade24; 09-21-2013 at 03:20 PM.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: If value found in column A return same row value in column B

    The wildcards would have to be concatenated in:

    =IFERROR(INDEX(B:B, MATCH("*" & C4 & "*", A:A, 0)), "False")

+ 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. [SOLVED] Return value from 1st Column based on Data found in corresponding Columns
    By jahtrini in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-12-2013, 03:51 PM
  2. [SOLVED] Checking if a value can be found in a colum and then return a value in another column
    By NowelChits in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-06-2013, 12:02 PM
  3. Replies: 10
    Last Post: 07-10-2012, 07:04 PM
  4. Comparing 2 columns- if a match is found return a value in 3rd column
    By lineson in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 12-20-2011, 04:48 PM
  5. Replies: 4
    Last Post: 10-03-2005, 12:05 PM

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