+ Reply to Thread
Results 1 to 6 of 6

Lookup/Index match with multiple criteria

  1. #1
    Registered User
    Join Date
    06-19-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    2

    Lookup/Index match with multiple criteria

    I've been trying to figure this out for hours and have had no luck.

    I have a set of data that I'm trying to build a lookup table off of. The raw data is in rows 1-9 and the table I'm trying to build is in rows 12-21

    I need to return the value of column G from the raw data when it matches the Name, Task and Sprint, and return null if there is no match. I've hard coded in what I want the output to look like because I couldn't figure out the formula. I think it's some sort of Index Match formula with 3 criteria, but I can't figure it out..

    Thank you so much for the help!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Lookup/Index match with multiple criteria

    Welcome to the forum.

    It will be much easier to get the results if you re-arrange your lower table a bit.
    1. Put an extra column 'Task' after the 'Name' and move the tasks to this column;
    2. Copy the ID and Name to each row;
    3. Optionally, remove the blank row against each name.

    The reason for (1) is to be able to clearly separate tasks from names in the formula below. The reason for (2) is to avoid a hugely complicated check of where the ID and Name can be found for each task.

    Now you can use an Index-Match formula (yes, you were right) in D14. It uses concatenation (the & symbol) to look up a combination of the ID-Name-Task-Sprint# against the concatenated columns from the upper table, then return the Status.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Important: this is an array formula so needs to be entered using Ctrl-Shift-Enter not just Enter. You will know the array is active when you see curly brackets { } appear around your formula - don't try to enter them yourself. If you do not Ctrl-Shift-Enter an array formula you will get an error or a clearly incorrect result. If that happens, just click into the formula bar and try again.
    Also make sure you have the $ symbols correct ($A13 but D$13, for example) as these specify how the formula works as you drag it across then down (or down then across) to G21.


    Lastly, you can optionally add some conditional formatting to 'grey-out' the duplicated IDs and Names in the lower table - just to make it easier to read.


    I've attached your file with the above changes and formula working. Hope that does what you want.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Registered User
    Join Date
    06-19-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Lookup/Index match with multiple criteria

    Thank you, that's perfect!!

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Lookup/Index match with multiple criteria

    I made the assumption that the format of the table could not be changed (why else would anyone put two different types of variables in the same column, right?!)
    Anyway, here's what I came up with (again, it is an array formula so use CNTRL SHFT ENTER)
    In B14 copied across and down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    And here's the spreadsheet to prove it.
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Lookup/Index match with multiple criteria

    You're welcome, glad I could help and thanks for marking the thread as Solved.

    @ChemistB: very nice, I went for the lazy option first!
    Last edited by Aardigspook; 06-19-2019 at 04:26 PM.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Lookup/Index match with multiple criteria

    Nothing wrong with the lazy option.

    Laziness is the mother of invention.
    or, Work smarter, not harder.

+ 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 (two lookup columns)
    By jason4444 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-09-2016, 03:30 PM
  2. [SOLVED] Multiple Criteria lookup to extract data from a dump - INDEX MATCH????
    By Rossovich in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-30-2016, 01:14 PM
  3. Lookup Multiple Criteria using Index-Match in VBA
    By ykobure in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-21-2015, 01:41 AM
  4. Need an array possibly INDEX/MATCH formula with multiple lookup criteria.
    By TheClaw2323 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-25-2015, 09:59 AM
  5. LOOKUP with Multiple Criteria (ARRAY INDEX and MATCH)
    By snowktt in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-14-2014, 02:24 AM
  6. Multiple Criteria Lookup/Match/Index
    By Kasz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-15-2011, 09:30 AM
  7. Replies: 3
    Last Post: 07-11-2009, 02:58 PM

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