+ Reply to Thread
Results 1 to 26 of 26

Lookup match index multiple values return other columns

  1. #1
    Registered User
    Join Date
    11-06-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Lookup match index multiple values return other columns

    Hi all,

    I'm a super newbie... please go easy on me

    Attached is my sample data...

    I need to match the names in column E with the names in A,B and C... and return column d...

    I don't think V-lookup will be of any assistance as there will be duplicates of even the most uncommon surnames.

    It is also possible that the middle name won't be in column B even if there is one in column E

    If there is no middle name in column E there will be 2x spaces between the first name and last name as per E5

    Cell E3 worries me with a surname that has a space in it "Le Royer"

    I was thinking INDEX and MATCH but was unsure how to use this with an "IF" or if more than one match is required

    Thanks in advance for your help!
    Attached Files Attached Files
    Last edited by martypocock; 11-07-2012 at 09:51 PM. Reason: SOLVED

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Lookup match index multiple values return other columns

    Hi Marty,

    although you are a newbie, that doesn't stop you looking through the Forum Rules. In them you would have seen reference to duplicate posts, and why they are not tolerated, and it is clear to me that this is a duplicate post. A moderator is likely to remove one of them soon, so please remember not to do this again.

    Pete

  3. #3
    Registered User
    Join Date
    11-06-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup match index multiple values return other columns

    sorry I realised I'd put it in the wrong sub-class - I'm not sure of how delete the other one

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Lookup match index multiple values return other columns

    @ marty -I've deleted the other thread you can continue here. You can PM Mod's if you ever encounter other problems.

    @ Pete, Thanks again,2 X,

    Regards,
    Vladimir
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  5. #5
    Registered User
    Join Date
    11-06-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup match index multiple values return other columns

    thanks... not off to a good start but anybody have a formula for me???

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Lookup match index multiple values return other columns

    Only moderators can delete threads. You could go back to your other thread (if that's the one you want to get rid of) and add another post to that effect. Also, you could PM one of the moderators and ask them to delete it for you (provide a link to it).

    Pete

  7. #7
    Registered User
    Join Date
    11-06-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup match index multiple values return other columns

    ok... got that clear....

    now... can anybody help?

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Lookup match index multiple values return other columns

    Well it's a bit too late for me - need to get some sleep. I'm sure someone else will be along soon.

    Pete

  9. #9
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Lookup match index multiple values return other columns

    Hi marty,

    Try this formula...

    =IFERROR(VLOOKUP(A1&" "&B1&" "&C1,$E$1:$E$10,1,0),IFERROR(VLOOKUP(A1&" "&C1,$E$1:$E$10,1,0),"not in list"))

    Let me know if this is not what you need...

    - Dennis

  10. #10
    Registered User
    Join Date
    11-06-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup match index multiple values return other columns

    Sorry I'm really not making a great first impression

    I have a list of names (Column E)

    and I have a 2nd list of names but broken into first, middle, surnames (column A,B & C) with a number against them (column D) - column B won't necessarily contain the middle name but it will probably be in column E if there is one)

    I need to match the names in column E with the names in A,B and C... and return the number in Column D...

    Will using Vlookup be an issue if there are duplicate first, middle or surnames?

    Dennis, Thankyou for your help

    Marty
    Last edited by martypocock; 11-06-2012 at 09:40 PM.

  11. #11
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Lookup match index multiple values return other columns

    Sorry, Marty, here's a revision that will capture more people...

    First, copy this formula in cell F1, then copy to the rest...
    =LEFT(E1,SEARCH(" ",E1)-1)&" "&RIGHT(E1,LEN(E1)-SEARCH(" ",E1,SEARCH(" ",E1)+1))

    Then the new formula should be the following...
    =IFERROR(VLOOKUP(A1&" "&B1&" "&C1,$E$1:$E$10,1,0),IFERROR(VLOOKUP(A1&" "&C1,$E$1:$E$10,1,0),IFERROR(VLOOKUP(A1&" "&B1&" "&C1,$F$1:$F$10,1,0),IFERROR(VLOOKUP(A1&" "&C1,$F$1:$F$10,1,0),"not in list"))))

    This will capture more if people have 2 or 3 names...

    Misspelling such as Nicolas vs Nicholas will never be found...

    Hope this helps...

    - Dennis

  12. #12
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Lookup match index multiple values return other columns

    How about array formula index/match

    =IFERROR(INDEX($D$1:$D$10,MATCH(E1,$A$1:$A$10&" "&$B$1:$B$10&" "&$C$1:$C$10,0)),"not found") -ctrl+shift+enter

    note: please test on other instances of the names, didn't test it.

  13. #13
    Registered User
    Join Date
    11-06-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup match index multiple values return other columns

    Sorry it is the number in column D that I need - sorry I got the first post wrong

  14. #14
    Registered User
    Join Date
    11-06-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup match index multiple values return other columns

    Quote Originally Posted by vlady View Post
    How about array formula index/match

    =IFERROR(INDEX($D$1:$D$10,MATCH(E1,$A$1:$A$10&" "&$B$1:$B$10&" "&$C$1:$C$10,0)),"not found") -ctrl+shift+enter

    note: please test on other instances of the names, didn't test it.
    This is definatley on the right track but if the middle name in column C is missing (and this is likely - because I can't get my staff to consistently put them in) then there is no result returned

  15. #15
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Lookup match index multiple values return other columns

    Oops, my formula is completely "backwards"...

    Follow Vlady's solution... it should work really well...

    Make sure to still use my Column F and change Vlady's formula to find those...

    Let us know if you still can't follow...

    Thanks,
    Dennis

    PS problems with duplicates will always exist either with vlookups or index/match
    Last edited by djapigo; 11-06-2012 at 10:16 PM.

  16. #16
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Lookup match index multiple values return other columns

    i took the liberty to assume that only first_name and last_name need to be matched.

    take a look at the attached.
    Attached Files Attached Files
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  17. #17
    Registered User
    Join Date
    11-06-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup match index multiple values return other columns

    WOW!

    Thankyou!

    Absolutley Awesome!!

    thankyou to everyone who replied

  18. #18
    Registered User
    Join Date
    11-06-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup match index multiple values return other columns

    removed see last post
    Last edited by martypocock; 11-07-2012 at 02:47 AM.

  19. #19
    Registered User
    Join Date
    11-06-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup match index multiple values return other columns

    removed see last post
    Last edited by martypocock; 11-07-2012 at 02:48 AM.

  20. #20
    Registered User
    Join Date
    11-06-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup match index multiple values return other columns

    Quote Originally Posted by icestationzbra View Post
    i took the liberty to assume that only first_name and last_name need to be matched.

    take a look at the attached.
    Ok.... scrap my last post completly... I now have 2 new fields with pure data H and I

    new sample attached

    I need to match (A) first name and (C) last name - exactly with the data that is within (G) full name and return (F) phone number - this part solved - thankyou icestationzbra
    If (B) middle name is present in (B) then I need to match it with what is within (G) - but won't necessarily always be in (B) even if it is in (G)

    Because first and last names will have lots of matches and middle name won't always be there I also need to......

    Make sure (H) suburb and (I) postcode matches with what is in (D) and (E) before returning (F) phone number


    Hope this makes sense... what a headache!
    Attached Files Attached Files

  21. #21
    Registered User
    Join Date
    11-06-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup match index multiple values return other columns

    Anybody????

    help!

  22. #22
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Lookup match index multiple values return other columns

    Hi marty,

    Great formula given by icestation, but I personally like vlady's solution... here's a modified version... that might work for you...
    =IFERROR(INDEX($F$3:$F$12,MATCH(G3&I3&J3,$A$3:$A$12&" "&$B$3:$B$12&" "&$C$3:$C$12&$D$3:$D$12&$E$3:$E$12,0)),IFERROR(INDEX($F$3:$F$12,MATCH(H3&I3&J3,$A$3:$A$12&" "&$C$3:$C$12&$D$3:$D$12&$E$3:$E$12,0)),"not found"))
    ctrl-shift-enter

    vlady - didn't mean to step on your work, I just wanted to give marty a solution...

  23. #23
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Lookup match index multiple values return other columns

    Sorry, marty...

    You have to add a helper column H for the formula to work (like I suggested before)... see the attached file...

    sample3(1).xlsx

  24. #24
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Lookup match index multiple values return other columns

    try in J3, then drag-fill down:

    Please Login or Register  to view this content.
    another approach in J3 and drag-fill down:

    Please Login or Register  to view this content.
    Last edited by icestationzbra; 11-07-2012 at 11:00 PM. Reason: another approach

  25. #25
    Registered User
    Join Date
    11-06-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Lookup match index multiple values return other columns

    Fantastic help guys!!! really really appreciated...!!!! Thankyou again to everyone

  26. #26
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Lookup match index multiple values return other columns

    See the attached
    Attached Files Attached Files

+ 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