Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: Vlookup with multiple occurances of a value

  1. #21
    New Member
    Join Date
    Apr 2019
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Vlookup with multiple occurances of a value

    Hi again Fluff. I promise this will be my last question!
    If I wanted to get different/more columns from the Master list - what would I need to change to give me the different column(s)?

  2. #22
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,009
    Post Thanks / Like
    Mentioned
    467 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Vlookup with multiple occurances of a value

    You'd need to change the parts in blue
    Code:
                If Not .Exists(Trim(Sp(i))) Then
                   .Add Sp(i), Cl.Offset(, 1).Resize(, 3)
                Else
                   Set .Item(Trim(Sp(i))) = Union(.Item(Trim(Sp(i))), Cl.Offset(, 1).Resize(, 3))
                End If
    So if you wanted to get columns C:F you'd use
    Code:
    Cl.Offset(, 2).Resize(, 4)
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #23
    New Member
    Join Date
    Apr 2019
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Vlookup with multiple occurances of a value

    Thank you sooooooo much. And such an incredibly fast response time.

  4. #24
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,009
    Post Thanks / Like
    Mentioned
    467 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Vlookup with multiple occurances of a value

    You're welcome & thanks for the feedback
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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