+ Reply to Thread
Results 1 to 5 of 5

Problem with formula that is supposed to lookup and return multiple values

  1. #1
    Registered User
    Join Date
    05-15-2009
    Location
    Honolulu, Hawaii
    MS-Off Ver
    Excel 2002
    Posts
    3

    Problem with formula that is supposed to lookup and return multiple values

    I'm trying to pull (look up) employee names that are working on a specified project. Multiple employees work on a specified project and employees work on multiple projects. The simple lookup formula does not work since it only returns the first employee name from a specified project.

    I did try an index array formula included below, that almost works except for some reason it returns 3 extra employee names (Fred, Sara, and Jan) and is missing 2 employees (Jim and Mary). See the attached file.

    {=INDEX($G$5:$H$43,SMALL(IF($G$5:$G$43=$D$6,ROW($G$5:$G$43)),ROW(1:1)),2)}

    Also, the formula returns duplicate names which I don't want. I only want the name shown once for that particular project.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,008

    Re: Problem with formula that is supposed to lookup and return multiple values

    Try this

    C10
    Please Login or Register  to view this content.
    Commited with Ctrl+Shift+Enter.

    You can also see attachment.


    Hope this helps,
    windknife
    Attached Files Attached Files

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Problem with formula that is supposed to lookup and return multiple values

    Attached are a couple of slightly different approaches, namely

    1 - Pivot Table (preferred)

    2 - Index Key Based Approach (Green cells) which negate need for expensive Array formulae, undoubtedly less elegant but at the same time undoubtedly more efficient.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-15-2009
    Location
    Honolulu, Hawaii
    MS-Off Ver
    Excel 2002
    Posts
    3

    Re: Problem with formula that is supposed to lookup and return multiple values

    Thank you Windknife and DonkeyOte, each of your methods work. I appreciate your help.

  5. #5
    Registered User
    Join Date
    05-15-2009
    Location
    Honolulu, Hawaii
    MS-Off Ver
    Excel 2002
    Posts
    3

    Re: Problem with formula that is supposed to lookup and return multiple values

    Windknife,

    I ended up using your solution. Can you explain how that formula works, so that I can understand it for future reference?

    Thanks.

+ 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