+ Reply to Thread
Results 1 to 10 of 10

reverse vlookup how - duplicate issue

  1. #1
    Registered User
    Join Date
    02-08-2012
    Location
    redditch
    MS-Off Ver
    Excel 2003
    Posts
    12

    reverse vlookup how - duplicate issue

    Hi

    I have just used this formula from a previous thread in here (reverse vlookup how)

    =INDEX($A$1:$A$7,MATCH(F10,$D$1:$D$7,0))

    and it works great. I am using the formula =large('MR Data'!M:M,1) to get my top 10 oldest items from a list of activities and then this formula to populate other fields against it. The problem I have come across is that in the top 10 there are some duplicates so when i do the lookup above they pull the corresponding data to the first one in the list and not each item. How can I do this?

    Thankyou in advance, Kerry
    Last edited by kerrold1; 02-08-2012 at 10:55 AM.

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

    Re: reverse vlookup how - duplicate issue

    Attach an example file so that we can see how to set up appropriate tie-breaks for you.

    Pete

  3. #3
    Registered User
    Join Date
    02-08-2012
    Location
    redditch
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: reverse vlookup how - duplicate issue

    Here you go, file now attached.
    The data is in sheet 1 and the table with formulas in sheet 2

    Thanks
    Kerry
    Attached Files Attached Files

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

    Re: reverse vlookup how - duplicate issue

    Try this formula in C3:

    =INDEX(Sheet1!A$2:A$100,SMALL(IF(Sheet1!$K$2:$K$100=$I3,ROW(Sheet1!$K$2:$K$100)-ROW(Sheet1!$K$2)+1),COUNTIF($I$3:$I3,$I3)))

    confirmed with CTRL+SHIFT+ENTER not just ENTER and copied down.

    If any of the columns have unique values only, like the Employee Name perhaps.. then for better efficiency, apply the formula above only to column D in your sheet, then use your original Index/Match configuration to get the other columns....

    Array formulas can be inefficient if a lot are used and if the ranges are large....

    also the Date column (H) may need to be formatted as Date.
    Last edited by NBVC; 02-08-2012 at 09:08 AM.
    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.

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

    Re: reverse vlookup how - duplicate issue

    I've put new formulae and changed some of your others in the attachment, which now avoids duplicates and reports correctly.

    Hope this helps.

    Pete
    Last edited by Pete_UK; 02-08-2012 at 09:28 AM.

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

    Re: reverse vlookup how - duplicate issue

    I've put new formulae and changed some of your others in the attachment, which now avoids duplicates and reports correctly.

    Hope this helps.

    Pete
    Attached Files Attached Files

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

    Re: reverse vlookup how - duplicate issue

    Here is my version....
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    02-08-2012
    Location
    redditch
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: reverse vlookup how - duplicate issue

    Thank you very much NBVC this works perfectly. Just one question for future reference, if ever any of the numbers are duplicated more than once will this formula still work?

    Thanks
    Kerry

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

    Re: reverse vlookup how - duplicate issue

    Yes, it should. The formula is designed to take next unique match for the duplicated rank, so that the same data should not be duplicated unless the data itself is duplicated in the original database.

  10. #10
    Registered User
    Join Date
    02-08-2012
    Location
    redditch
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: reverse vlookup how - duplicate issue

    Thank you

    Kerry

+ 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