+ Reply to Thread
Results 1 to 9 of 9

Finding Match - Returning separate value

  1. #1
    Registered User
    Join Date
    02-07-2014
    Location
    New York City
    MS-Off Ver
    Excel 2003
    Posts
    10

    Finding Match - Returning separate value

    =IF(MATCH(B2,A:A,0),$F:$F)

    Hi everyone,

    Here's what I'm trying to do:

    I want to take a phone number given in B2 and find its match in A:A, printing the F value that corresponds with the match in A. The match formula returns row # "2049", but my IF function returns F2 instead of F2049.

    If this makes sense, I would appreciate some thoughts on how to print F(match value)

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Finding Match - Returning separate value

    try
    index(F:F,MATCH(B2,A:A,0))

    if there is no match - what do you want to happen
    use iferror to manage the error

    =iferror(index(F:F,MATCH(B2,A:A,0)), "what you want if not found")
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    02-07-2014
    Location
    New York City
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Finding Match - Returning separate value

    Wayne! Thanks for the help!

    I've never used the index function, if you don't mind, could you explain how that's working a little? I like to try and learn what I'm doing instead of copying and pasting.

    Every number was supposed to have a match, but alas that's not the case.

  4. #4
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Finding Match - Returning separate value

    Or
    =iferror(vlookup(b2,a:f,6,0), "")
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Finding Match - Returning separate value

    its an alternative to vlookup

    the index( f:f
    this is looking in the column F:F to return a value

    then we use MATCH( B2,A:A,0)

    find a match in column AA for B2 , and the 0 means it must be an exact match
    now the MATCH tells the index part which row to return the Value in column F from

    if no match is found - you get a #N/A
    then as thats an error which can be handled by iferror - we can use that function

    iferror ( formula , "error return" )
    if there is no error - the formula is executed
    if there is an error - it will return what ever is after the ,

    hope that helps

    vlookup - looks up in the left hand column and returns a value from the right hand columns
    index/match can return any column

  6. #6
    Registered User
    Join Date
    02-07-2014
    Location
    New York City
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Finding Match - Returning separate value

    Thanks again! I had the match function down, but was unsure what index was doing. Regardless, thank you for the explanation.

    Thank you Rob as well. I tried using vlookup and it wasn't working out the way I wanted. I knew I was close with match, but couldn't find the missing puzzle piece.

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Finding Match - Returning separate value

    the vlookup and the index / match should return the same result

  8. #8
    Registered User
    Join Date
    02-07-2014
    Location
    New York City
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Finding Match - Returning separate value

    What I meant to say, is I wasn't using vlookup correctly, and I kept messing around with formulas until I finally gave in to ask for help. I tried the vlookup formula Rob gave, and I tried your iferror formula..both ended in errors

  9. #9
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Finding Match - Returning separate value

    in which case you have an issue with the lookup part

    you need to test
    B2 - column B
    and A:A - Column A
    find where you think there should be a match - say B2 should = A22
    then on a cell try

    =B2=A22

    and see if that gives TRUE - if not
    check there are no leading or trailing spaces (trim() will help )
    or that if numbers , one is formatted as a number and the other as text
    if a number is text - you will need to use value()
    or click on the column and use text to columns to convert
    a few other ways exist

    lets us know if we can help further - a sample spreadsheet would help

+ 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. Finding & Returning Data Based on 2 Parameters from a Separate Workbook
    By andrew.nelson in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-03-2013, 12:28 AM
  2. [SOLVED] Finding MIN value within range and returning MATCH
    By MaddyG in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-16-2012, 03:50 PM
  3. [SOLVED] Index & Match returning incorrect value. Arrays fixed and exact match used.
    By SDes in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-07-2012, 08:29 PM
  4. [SOLVED] Returning a 0 finding when multible criterion does not match
    By PTMD in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-17-2012, 02:50 AM
  5. Tough One: Finding Match Based on Criteria, Returning Value
    By christopher.sul in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-02-2005, 01:42 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