+ Reply to Thread
Results 1 to 6 of 6

Lookup one value in a range and then lookup another value beneath it

  1. #1
    Registered User
    Join Date
    12-29-2011
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Lookup one value in a range and then lookup another value beneath it

    Multiple lookup problem.xlsxI need help writing a formula that looks up multiple referenced in the same column. The report lists an employee's name and then the project(s) he/she is working on beneath him/her in same column. The projects and employees are not constant. One month employee A will be listed first and then the next month Employee B or C is listed first and Employee A is not listed at all. Also, the projects are not constant either. Employee A may work on Projects 1, 2, and 3 in one month and then projects 3, 4, and 5 the next month. This is how the report looks (and changes every month):

    A B
    1 Employee A [time spent]
    2 Project 1 [time spent]
    3 Project 2 [time spent]
    4 Project 3 [time spent]
    5 Employee B [time spent]
    6 Project 2 [time spent]
    7 Project 4 [time spent]
    8 Project 5 [time spent]
    9 Employee C [time spent]
    10 Project 1 [time spent]
    11 Project 5 [time spent]

    I have attempted to use INDEX and MATCH functions together as well as IF/AND/MATCH/OFFSET functions together, but that only helps me get the first project beneath the employee. I want separate the employees to show what projects (and for how long) each employee is working on per month.

    Thank you for your help!

  2. #2
    Valued Forum Contributor
    Join Date
    07-29-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003/Excel 2010
    Posts
    534

    Re: Lookup one value in a range and then lookup another value beneath it

    See attachment.
    Attached Files Attached Files

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,660

    Re: Lookup one value in a range and then lookup another value beneath it

    Same solution as Wher, but sligtly simplified (since you have XL 2007 I've used IFERROR function).
    Attached Files Attached Files

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Lookup one value in a range and then lookup another value beneath it

    with abit of re arranging you could use a pivot table
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    12-29-2011
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Lookup one value in a range and then lookup another value beneath it

    Take 2 - Multiple lookup problem.xlsx

    All,

    Thank you for your respones, but I am afraid that I still neeed more help. I am attaching another file that is more true to the format of the data. It also explains how I receive the data month by month and how I want to display it cumulatively. I will continue to attempt to use the formulas you already provided to this, but have already spent a couple of hours tyring that and haven't yet figured it out. Thank you for any help you can provide.

    Chris

  6. #6
    Registered User
    Join Date
    11-06-2011
    Location
    Massachusetts, USA
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Lookup one value in a range and then lookup another value beneath it

    My two-cents worth - I think the pivot table solution is going the right direction. A problem that needs to be overcome is distinguishing between a person and a project, since not all people start with "Person " and not all projects end in a number. Is it possible to have a table of all potential people? Then, a formula would test to see if Column A is found in that table - if so, it is a person, and if not, it is a project.

    Also, how are subsequent months handled? Do they get added to the bottom of Columns A and B? If so, I assume the month/year could be indicated beside them, so as to get them in the right columns of the pivot table.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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