+ Reply to Thread
Results 1 to 3 of 3

Vlookup - Duplicate Values

  1. #1
    Registered User
    Join Date
    11-23-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Vlookup - Duplicate Values

    HI,

    This is my first posting and i have very limited knowledge in writing Excel formulas. Here is my question

    Col1 Col2 Col3
    ------- ------ -------
    AAA 1 Grapes
    BBB 2 Banana
    TEST 3 Apple
    TEST 4 Orange


    How do I write a excel formula to Capture the value "Apple". I used the Vlookup Formula "=VLOOKUP("TEST",A1:C4,3)" and it not working the way I wanted. My Result is always "Orange". What is the formula that I can write to capture Apple in one row and than another formula to capture Orange in another row.

    Please Note: My Values in the Table are getting loaded dynamically(number of rows change)

    Thanks
    Sraju

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Vlookup - Duplicate Values

    Hi Sraju, welcome to the forum.

    To always return the first match in VLOOKUP, you must use the 4th argument of VLOOKUP and set it to FALSE. So change your formula to:

    =VLOOKUP("TEST",A1:C4,3,0)

    Where 0 is equivalent to FALSE. This should return the first match. You can't, however, use VLOOKUP in one instance to return the first match, and in another find the last match.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Vlookup - Duplicate Values

    you can use a helper to identify each instance then use index match see attached
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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