+ Reply to Thread
Results 1 to 7 of 7

help with index and match that returns value based on multiple criteria

  1. #1
    Registered User
    Join Date
    09-27-2021
    Location
    barcelona
    MS-Off Ver
    365
    Posts
    3

    help with index and match that returns value based on multiple criteria

    Hello,

    I have a "CALENDAR" tab which includes subject ID (column B), the date of visit (column A), and a list of tasks (rest of the columns). Under each column I record the date the subject completed the task. On the tab "TASK_COMPLETION_LIST" I have a list of all subject IDs in column A and the diferent tasks are the headers of the rest of the columns.

    I want to write a lookup formula in each cell of the "TASK_COMPLETION_LIST" tab that will return the date the subject completed the task. The tricky part is that same subject may come in multiple times on different days and complete different tasks on different days so the lookup function needs to be able to find multiple matches and return only the cell that is not empty (in theory each subject will have to complete each task only once).

    For example, I need a formula that I can put in cell B10 of the "TASK_COMPLETION_LIST" tab and drag across to fill th rest of the columns. I am trying an index and match function with multiple criteria but its not working for me.

    Thank you for your help.

    Miguel
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: help with index and match that returns value based on multiple criteria

    Please try the following in TASK_COMPLETION_LIST!B2 copied down and across:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Edit: The red highlighted edits above are per post #5

    I believe this gives your expected results.

    This formula assumes that there is only one row with the same ID and a non-blank completion date. If that is not true then you will see dates way in the future.

    The iferror(1/1/ . . . just gets rid of the clutter of zeros where the is no completion date for a particular ID/Task

    Let us know if this works for you
    Last edited by GeoffW283; 09-28-2021 at 01:38 PM.
    Geoff

    Did I help significantly? If you wish, click on * Add Reputation to say thanks.
    If your problem has been resolved please select ?Solved? from the Thread Tools menu

  3. #3
    Registered User
    Join Date
    09-27-2021
    Location
    barcelona
    MS-Off Ver
    365
    Posts
    3

    Re: help with index and match that returns value based on multiple criteria

    Hello,

    Thanks GeoffW283 for your response! I tried the formula but it doesnt produce the desired results. For example I entered it in cell B5 of the "TASK_COMPLETION_LIST" tab and it gives back a date which does not correspond to the date that subject completed the task. The date each subject completed each task is in the "CALENDAR" tab.I attached another excel file which I think is clearer. The desired results are in rows 2 and 3 of the "TASK_COMPLETION_LIST" tab.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: help with index and match that returns value based on multiple criteria

    See attached: the formula in B5 referenced A6 not A5
    Attached Files Attached Files
    Last edited by JohnTopley; 09-28-2021 at 04:27 AM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  5. #5
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: help with index and match that returns value based on multiple criteria

    John: thanks for the much needed correction.

    miggysantini: My post #2 had the wrong formula and I told you to put it in the wrong cell. Apart from that it was fine

    John's attachment is correct per my intent. Just for the record I have made the necessary corrections to my post #2. They are highlighted in red.
    Last edited by GeoffW283; 09-28-2021 at 01:50 PM.

  6. #6
    Registered User
    Join Date
    09-27-2021
    Location
    barcelona
    MS-Off Ver
    365
    Posts
    3

    Re: help with index and match that returns value based on multiple criteria

    yes, it produces the desired results, thank you! I had never used the sumproduct formula so I didnt catch the cell reference error. Thank you!

  7. #7
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: help with index and match that returns value based on multiple criteria

    Glad we could help. Thanks for the feedback and rep.

+ 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. Index Match with multiple criteria returns and error
    By mattdamon33 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-24-2021, 06:13 AM
  2. Replies: 1
    Last Post: 03-01-2020, 10:36 PM
  3. Replies: 1
    Last Post: 01-18-2019, 03:55 PM
  4. How to sum Index/Match based on multiple criteria ?
    By donny007 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-18-2019, 02:06 AM
  5. [SOLVED] Index-Match based on multiple criteria
    By JBR9999 in forum Excel General
    Replies: 2
    Last Post: 09-01-2016, 02:14 PM
  6. [SOLVED] Index/Match based on multiple criteria
    By BB1972 in forum Excel General
    Replies: 7
    Last Post: 08-17-2012, 11:45 AM
  7. Index and Match Based on Multiple Criteria
    By duranbeaz in forum Excel General
    Replies: 2
    Last Post: 05-22-2009, 04:37 AM

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