+ Reply to Thread
Results 1 to 5 of 5

Vlookup question

  1. #1
    Registered User
    Join Date
    06-27-2013
    Location
    Newcastle
    MS-Off Ver
    Excel 2003
    Posts
    7

    Vlookup question

    I am using vlookups but come across an issue where if multiple records exist it only pulls through one of the values. I have had a look around and found people talking about this however I cannot seem to get it working still.

    Example below

    [Source sheet1]
    A B C
    Amy blue Tshirt
    David green Tshirt
    David red Trousers
    John yellow Tshirt

    If I do a classic vlookup against the above and ask to return the values in B I will only get green returning for David. I have below shown the target sheet where I am collating the data form the above

    [Summary Sheet]
    A B C
    Amy Tshirt =VLOOKUP(A1,SourceSheet1!A:C,2,FALSE) - Should return Blue - WORKS
    David Tshirt =VLOOKUP(A2,SourceSheet1!A:C,2,FALSE) - Should return Green - WORKS
    David Trousers =VLOOKUP(A3,SourceSheet1!A:C,2,FALSE) - Should return Red - DOES NOT WORK
    John Tshirt =VLOOKUP(A4,SourceSheet1!A:C,2,FALSE) - Should return Yellow - WORKS

    I will need to somehow put logic in to include the C column containing the 2 different types (Tshirt, Trousers). I may need to put extra types of garments into the column such as shoes or socks. This means I will need this to be dynamic enough to understand if there is a person with the same name but with multiple garments in the source sheet it can differentiate it. the spreadsheet i am using to collate this will have multiple entries for each name with the expected garment already in as in the second table (Summary Sheet)


    Any help appreciated

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Vlookup question

    Hello bourny,

    Welcome to the Forum.

    Have you tried Index & Match, instead of VLookUp?
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Vlookup question

    Hi,

    The simplest way is to use an additional helper column in your source sheet as the first column and concatenate current columns A & C so that you have in the new column A
    DavidTShirt
    DavidTrousers

    etc.

    Then just change your lookup column reference to 3 from 2
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    06-27-2013
    Location
    Newcastle
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Vlookup question

    Thanks for the suggestions. I will give some of these a go.

  5. #5
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Vlookup question

    Try Index match with Array Formula.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    confirm the formula by pressing Ctrl + Shift + Enter, not just Enter

    which will looks like..
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

+ 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