+ Reply to Thread
Results 1 to 11 of 11

ISNA INDEX Match Formula help

  1. #1
    Registered User
    Join Date
    04-30-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    4

    ISNA INDEX Match Formula help

    I've used isnda index match in past, but it's been quite awhile since I've used it.

    So, I need help with trying to use the same or similar to search through all rows in column B which contains first name and last name in string format e.g. tina cancino then find a matching record by scanning all rows in column G that also contain first name and last name in string format. If match there's an exact match, then I'd like to pull value in column D.

    =ISNA(INDEX(B3:B730,MATCH(G3:G46,D3)))

    the above forumula returns "true" instead of value in D3. I've verified every row with'true' is actually an exact match.


    Please help with forumula to fetch value in column D if match is found.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: ISNA INDEX Match Formula help

    Try:

    =INDEX($D$3:$D$46,MATCH(B3,$G$3:$G$46,0))

    copied down.

    To return blanks when no match found.

    =IF(ISNUMBER(MATCH(B3,$G$3:$G$46,0)),INDEX($D$3:$D$46,MATCH(B3,$G$3:$G$46,0)),"")

    copied down
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

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

    Re: ISNA INDEX Match Formula help

    tcandls,

    Welcome to the forum!
    Something like this should work for you:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

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

  4. #4
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: ISNA INDEX Match Formula help

    It should be

    =IF(ISERROR(INDEX($B$3:$B$46,MATCH($G$3:$G$46,D3,0))),"",INDEX($B$3:$B$46,MATCH($G$3:$G$46,D3,0)))

  5. #5
    Registered User
    Join Date
    04-30-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: ISNA INDEX Match Formula help

    Quote Originally Posted by NBVC View Post
    Try:

    =INDEX($D$3:$D$46,MATCH(B3,$G$3:$G$46,0))

    copied down.

    To return blanks when no match found.

    =IF(ISNUMBER(MATCH(B3,$G$3:$G$46,0)),INDEX($D$3:$D$46,MATCH(B3,$G$3:$G$46,0)),"")

    copied down


    I copied formula, and replaced 0 with 1 because there are cases of first and last name in column B and G which are not exact e.g column B has ERNESTINE CANCINO AND column G has Ernestine Cancino.

    While it did fetch coreid I was seeking for those with a match, now I have to figure out how to get D for those names that differ as noted above.

    thanks again!

  6. #6
    Registered User
    Join Date
    04-30-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: ISNA INDEX Match Formula help

    Thanks I copied forumula but it didn't return the value in column D.

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: ISNA INDEX Match Formula help

    An alternative to:

    =IF(ISNUMBER(MATCH(B3,$G$3:$G$46,0)),INDEX($D$3:$D$46,MATCH(B3,$G$3:$G$46,0)),"")
    would be
    =IF(COUNTIF($G$3:$G$46,B3),INDEX($D$3:$D$46,MATCH(B3,$G$3:$G$46,0)),"")

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: ISNA INDEX Match Formula help

    My formulas are not case sensitive.... so ERNESTINE CANCINO should match fine with Ernestine Cancino.

    Cutter, although I never tested it myself, I learned a long time ago in my days at another popular forum, that the IsnumberI(Match()) is actually more efficient than the COUNTIF() alternative.... that's one reason I always go with the ISNUMBER(MATCH())

  9. #9
    Registered User
    Join Date
    04-30-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: ISNA INDEX Match Formula help

    Quote Originally Posted by tigeravatar View Post
    tcandls,

    Welcome to the forum!
    Something like this should work for you:
    Please Login or Register  to view this content.
    Thanks for the welcome. I've copied this formula, and it is quite similar to what I used in past however, I keep getting a ref error. I'm actually using excel 2007 and am wondering if formula is different for this version of .xls.

    It's not even returning the value in column.

    here's sample data and forumula I copied: =IF(ISNA(MATCH(D2:$D$7,$G$3:$G$13,0)),"9",INDEX(A2,MATCH(D2,$G$3:$G$13,0)))

    USERID FIRST_NAME LAST_NAME Full_Name Match Function UserLog Distinct 2012 Only
    111111 i i Fela Navarro 9 Anna Alva
    222222 i i Arnold Doe 9 James Doe
    333333 i i James Doe 9 Arnold Doe
    444444 i i No One #REF! No One
    555555 5 5 James Paul 9 Paul James
    666666 6 6 TINA CAN #REF! Tina Can
    777777 7 7 Anna Alva 9


    Much thanks to all for helping me get back into the groove of things...I've been away from this for some time.
    Attached Files Attached Files
    Last edited by tcandls; 05-01-2012 at 06:04 PM. Reason: uploaded file

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

    Re: ISNA INDEX Match Formula help

    tcandls,

    In the formula you posted I can see multiple errors with its syntax. And I am unable to create a table faithful to the one you've posted and I don't know what results you are expecting from the formula, so if you could attach a sample workbook that would be very helpful.

    As for the formula syntax, you have:
    =IF(ISNA(MATCH(D2:$D$7,$G$3:$G$13,0)),"9",INDEX(A2,MATCH(D2,$G$3:$G$13,0)))

    The first red part is bad because when you're performing a match, you should only be looking up a single value, instead of a range of a values.
    The second red part is bad because index should be looking at the column of return values, not a single cell.

    Correcting your formula would have it look like this:
    =IF(ISNA(MATCH(D2,$G$3:$G$13,0)),"9",INDEX($A$3:$A$13,MATCH(D2,$G$3:$G$13,0)))


    But I can't confirm it will provide the desired results because I am unable to faithfully recreate your test table.

  11. #11
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: ISNA INDEX Match Formula help

    Quote Originally Posted by NBVC View Post
    Cutter, although I never tested it myself, I learned a long time ago in my days at another popular forum, that the IsnumberI(Match()) is actually more efficient than the COUNTIF() alternative.... that's one reason I always go with the ISNUMBER(MATCH())
    Thanks for that. I can see that being the case with large ranges since the MATCH() would only go as far down as needed (if there was a match) whereas the COUNTIF() always looks at the entire range (as would the MATCH() if the match was the last entry) but the OP in this case is only looking at 43 rows. I will definitely keep that in mind from now on though. So, thanks again for the tip.

    I found this discussion on it (between Domenic and Harlan Grove) from 2005 :
    http://www.excelforum.com/excel-work...umproduct.html
    Last edited by Cutter; 05-01-2012 at 04:38 PM. Reason: Added link

+ 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