+ Reply to Thread
Results 1 to 2 of 2

Return multiple columns with vlookup when there are multiple matches

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    Waltham, MA
    MS-Off Ver
    Excel 2007
    Posts
    25

    Return multiple columns with vlookup when there are multiple matches

    I have a sheet with three columns. Within column B there are 10 distinct types, however, column A can have duplicate values. I am trying to get the corresponding value for each name within A should the type in column B match on a separate sheet. The formula I have is as follows:

    =IF(VLOOKUP($A2,Sheet1!$A:$C,2,FALSE)=B$1,(VLOOKUP($A2,Sheet1!$A:$C,3,FALSE)), "")

    With the if test changing from B-K for each type I am trying to match. However, it is only returning the first match and not any subsequent matches.

    This is representative of the table for vlookup:

    Name Type Cost
    #1 Eric 360 DB $2.00
    #1 Eric Cert $8.50
    #1 Eric Self $14.00

    And this for the results:

    Name 360 DB Cert Self
    #1 Eric 2.00 8.50 14.00

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Return multiple columns with vlookup when there are multiple matches

    There's a few ways you could do this; I went with SUMPRODUCT.

    =SUMPRODUCT((Sheet1!$A$2:$A$4&Sheet1!$B$2:$B$4=Sheet2!$A2&Sheet2!B$1)*(Sheet1!$C$2:$C$4))

    You'd need to adapt the ranges for your amount of data, and just copy as far down and over as needed.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Lookup and return multiple matches across multiple sheets
    By somnath6309 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2013, 03:45 PM
  2. [SOLVED] VLOOKUP (or Index/Match) across four columns -- and returning multiple matches
    By rcasey in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-11-2013, 05:20 PM
  3. VLOOKUP return multiple matches in columns
    By Gracie789 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-10-2008, 07:38 PM
  4. Baseball Q - Return Multiple Matches in Column/VLookup?
    By TENNISMAN in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-17-2007, 03:00 PM
  5. Vlookup to return the sum of multiple matches
    By AussieExcelUser in forum Excel General
    Replies: 4
    Last Post: 07-31-2006, 07:33 PM

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