+ Reply to Thread
Results 1 to 8 of 8

vlookup with duplicate reference numbers

  1. #1
    Registered User
    Join Date
    09-08-2009
    Location
    Dublin Ireland
    MS-Off Ver
    Excel 2003
    Posts
    3

    vlookup with duplicate reference numbers

    Hi
    i am trying to vlookup updates from 1 sheet to another the problem i have is that the number i use a a reference point could be on both sheets multiple times so when it does the vlookup it just finds the first update and replicates it even though there may be different results in each line on the original sheet your looking off. can i add a -1,-2 etc to each sheet prior to doing the vlookup so that the numbers will infact be unique ?

    Thanks in advance

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

    re: vlookup with duplicate reference numbers

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    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 Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    re: vlookup with duplicate reference numbers

    can you upload an example?

  4. #4
    Registered User
    Join Date
    09-08-2009
    Location
    Dublin Ireland
    MS-Off Ver
    Excel 2003
    Posts
    3

    vlookup with duplicate referance numbers with sample file

    Hi
    i am trying to vlookup updates from 1 sheet to another the problem i have is that the number i use a a reference point could be on both sheets multiple times so when it does the vlookup it just finds the first update and replicates it even though there may be different results in each line on the original sheet your looking off. can i add a -1,-2 etc to each sheet prior to doing the vlookup so that the numbers will infact be unique ?

    from the sample you can see if the ref mu is not in series it comes back with the first update it find as an example the update "yes" does not come over in the vlookup

    Thanks in advance

    updated with sample file can the original thread be removed
    Attached Files Attached Files

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    re: vlookup with duplicate reference numbers

    keego1ie, no need to create a new thread - I have merged your two into one.

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

    re: vlookup with duplicate reference numbers

    In X2 of Update sheet, add

    =A2&"_"&COUNTIF($A$2:A2,A2)

    and copy it down..

    then in S2 of Vlookup sheet, add

    =INDEX(update!$W$2:$W$8,MATCH(A2&"_"&COUNTIF($A$2:A2,A2),update!$X$2:$X$8,0))

    and copy down...

    update ranges to suit actual data.

  7. #7
    Registered User
    Join Date
    09-08-2009
    Location
    Dublin Ireland
    MS-Off Ver
    Excel 2003
    Posts
    3

    re: vlookup with duplicate reference numbers

    Thanks that worked much appreciated

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

    re: vlookup with duplicate reference numbers

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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