+ Reply to Thread
Results 1 to 8 of 8

Index/Match when the Match criteria is based on a second table

  1. #1
    Registered User
    Join Date
    07-20-2010
    Location
    Wisconsin
    MS-Off Ver
    Office 365
    Posts
    24

    Index/Match when the Match criteria is based on a second table

    Greetings-

    First, my apologies if the thread title is confusing. Part of my problem is naming what I'm trying to do. I've searched the web but obviously I'm not asking the right question because I'm not finding similar examples.

    Second, it is entirely possible that this belongs in the beginners forum because it is so simple. Sorry.

    In this example, Blood1, I wish to find the first instance of each blood type. The result in E13 should be 6/6/94, E14 should be 6/8/94, E15 should be 6/4/94, and E16 should be 6/5/94. Obviously, if column C had a blood type next to each name it would be easy, but in my real-world spreadsheet adding that column would not be practical. Also, the two tables are on different pages.

    Thanks for any help.

    Peace,
    -Dawson
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    04-27-2015
    Location
    Abu Dhabi, U.A.E
    MS-Off Ver
    Office 365 | 2016
    Posts
    696

    Re: Index/Match when the Match criteria is based on a second table

    With the helper column C- extract the matching blood group to column C using index match or vlookup.
    Then enter the below array formula in E13 and select the column till E16- press ctrl+D

    =SMALL(IF($C$1:$C$20=D13,$A$1:$A$20),1)

    Press Ctrl+Shift+Enter

  3. #3
    Registered User
    Join Date
    09-12-2008
    Location
    Riversul
    MS-Off Ver
    2016
    Posts
    83

    Re: Index/Match when the Match criteria is based on a second table

    Hello Dawson, I've made a few changes on your submission in order to make it work. Please check if this can help you out with what you need.

    https://mega.nz/#!wlYCDLaI!KXPZpgWZC...RwnylmxHVKtI0s


    --
    Zenarte

  4. #4
    Valued Forum Contributor
    Join Date
    04-27-2015
    Location
    Abu Dhabi, U.A.E
    MS-Off Ver
    Office 365 | 2016
    Posts
    696

    Re: Index/Match when the Match criteria is based on a second table

    Look at this.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-20-2010
    Location
    Wisconsin
    MS-Off Ver
    Office 365
    Posts
    24

    Re: Index/Match when the Match criteria is based on a second table

    These work, but they work by adding the blood type column to the first table. I'm trying to find a way to do it without adding the third column.

    Peace,
    -Dawson

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Index/Match when the Match criteria is based on a second table

    This proposed solution also adds a third column, however it adds a earliest date column to the 'other' table (which has been placed on sheet 2 of the attached file), so perhaps that is more acceptable.
    The formula that populates the earliest date column is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The array entered formula* that populates E13:E16 is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Array entered formulas are activated by simultaneously pressing the Ctrl, Shift and Enter keys while the cell is in edit mode.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    07-20-2010
    Location
    Wisconsin
    MS-Off Ver
    Office 365
    Posts
    24

    Thumbs up Re: Index/Match when the Match criteria is based on a second table

    Quote Originally Posted by JeteMc View Post
    This proposed solution also adds a third column, however it adds a earliest date column to the 'other' table (which has been placed on sheet 2 of the attached file), so perhaps that is more acceptable.
    This solution is EXACTLY what I needed. The additional column, when added to the second table, is not only "acceptable", it actually adds to the functionality of my workbook in other areas.

    I am not Excel-experienced enough to understand exactly what is happening in the array formula, but I have a general idea. It isn't the first formula in my workbook that has me scratching my head, and probably won't be the last.

    Thanks!

    Peace,
    Dawson

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Index/Match when the Match criteria is based on a second table

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'.
    A good way to see what a formula is doing is to select a cell containing the formula (i.e. Sheet 1 cell E13) and run the Evaluate Formula from the Formulas tab. You'll see that the formula first makes a TRUE/FALSE array of dates corresponding to type A blood and then fills in the TRUE's with the date value (number of days since Jan 1st, 1900). Finally the formula picks the smallest of those values, 34491, which is the date 6/6/1994.
    I hope that you have a blessed day.

+ 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. VBA Code for Index/Match/Match to input into excel based on 2 criteria inside form
    By Carl Fisher in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2017, 12:11 PM
  2. Replies: 9
    Last Post: 05-21-2016, 01:13 PM
  3. Index-Match Multiple Criteria From Same Table
    By mycon73 in forum Excel General
    Replies: 0
    Last Post: 04-27-2016, 06:54 PM
  4. [SOLVED] Index, Match, or VLoopup? Returning a table value based on criteria from two drop down's
    By jkwlvsky in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-18-2015, 06:40 PM
  5. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  6. [SOLVED] MATCH 3 criteria in a table with INDEX & MATCH
    By SteelMaster in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-17-2014, 04:04 PM
  7. Index Match based on 2 Criteria only returning 1 match
    By stsanders22 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2012, 11:26 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