Consulting

Results 1 to 6 of 6

Thread: Vlookup with multiple results

  1. #1

    Vlookup with multiple results

    Hy guys,

    I want excel to show me which group a product is. The problem with this is, if the vlookup finds or does not find a first result it is not searching anymore.
    Now I need to find a way for it to do so. Or is there a better way with a new formula or a vba solution which I always love the most?

    vlo.jpg

    That is the table, where I want Column B to show the right Group.
    I wrote the vlookup in Row 10, just in case.

    Thanks in advance for your time

  2. #2

  3. #3

  4. #4
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location
    I'm confused

    a. Groups are made up of products (1 Group - N products) ?

    b. Products are made up of Parts (1 Product - N Parts) ??

    c. Groups are made up of Parts (1 Group - N Parts) ???


    or is it


    d. Groups are made up of Products which are made up of Parts ???? and a Part can be used in multiple Products which care in different groups


    Is a Product strictly in only 1 Group?

    Is a Part used in multiple Products?


    I want excel to show me which group a product is.
    Columns A-B do that with a simple VLOOKUP
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  5. #5
    Hy Paul,

    yeah a Product is strictly in only one group.
    A part is used in multiiple products.

    Colum B can't really do that, since vlookup gives back a #NA if it doesn't find the first part of a product. And not all parts are in the parts/group matrix.

  6. #6
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location
    I was going by

    I want excel to show me which group a product is.
    Parts aren't mentioned, so a VLOOKUP in A:B would do that

    So what is it you really want?

    1. For each Part
    2. Find what Product(s) it is used in
    3. Find what Group that Product is in
    4. List "Part" -- "Product" -- "Group" or
    "Group" -- "Product" -- "Part"


    Maybe attaching a WORKBOOK with the before and after will help us to understand
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •