+ Reply to Thread
Results 1 to 12 of 12

Index match - finding where two values 1st appear together

  1. #1
    Forum Contributor
    Join Date
    03-04-2014
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2019
    Posts
    756

    Index match - finding where two values 1st appear together

    Hello all,

    I have a small table on Sheet9. In column B & C are a series of numbers.

    The match number for column B will appear in columns E or G in Sheet 2 and the matching number for column C will appear in Column I on Sheet 2. The range is dynamic in sheet 2, based on data that is imported.

    I want to return the value from Column B in Sheet2 in H3 on Sheet9 for the 1st instance that the values in Columns B and C from Sheet 9 appear in Columns E/G and I in Sheet 2...


    Anyone assist?

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Index match - finding where two values 1st appear together

    I recommend uploading a small representative sample of your data along with the desired results (which you can enter manually) based on that data.

    To upload an Excel workbook, follow these steps:
    1) Click on "Go Advanced"
    2) Click on "Manage Attachments"
    3) Click on "Choose File"
    4) Choose your file and click on "Open"
    5) Click on "Upload"
    6) Click on "Close this window"

  3. #3
    Forum Contributor
    Join Date
    03-04-2014
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2019
    Posts
    756

    Re: Index match - finding where two values 1st appear together

    Please see the attached.

    Hopefully the colour coding helps
    Attached Files Attached Files

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Index match - finding where two values 1st appear together

    Try this in H3:

    =INDEX(Sheet2!B$2:B$13,IFERROR(MATCH($B3&$C3,Sheet2!$E$2:$E$13&Sheet2!$I$2:$I$13,0),MATCH($B3&$C3,Sheet2!$F$2:$F$13&Sheet2!$I$2:$I$13,0))) Ctrl Shift Enter

    Drag to the right and down.

  5. #5
    Forum Contributor
    Join Date
    03-04-2014
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2019
    Posts
    756

    Re: Index match - finding where two values 1st appear together

    I'm getting N/A on it

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Index match - finding where two values 1st appear together

    You have to enter the formula with Ctrl Shift Enter instead of just Enter.

    See the bold part of post #4.

  7. #7
    Forum Contributor
    Join Date
    03-04-2014
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2019
    Posts
    756

    Re: Index match - finding where two values 1st appear together

    I have entered it like that but I still get an error

  8. #8
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Index match - finding where two values 1st appear together

    That's odd. I am not getting an error on my end.

    See attachment.
    Attached Files Attached Files

  9. #9
    Spammer
    Join Date
    01-08-2015
    Location
    Cali, Colombia
    MS-Off Ver
    365
    Posts
    302

    Re: Index match - finding where two values 1st appear together

    Hi, to both!

    You could try this too:
    [H3] : =INDEX(Sheet2!B$2:B$13,MATCH(1,MMULT((Sheet2!$E$2:$F$13=$B3)*(Sheet2!$I$2:$I$13=$C3),{1;1}),))

    And drag it right and down. Blessings!

  10. #10
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Index match - finding where two values 1st appear together

    Nice. That gives me an idea.

    Here is another option that does not require Ctrl Shift Enter:

    H3 =INDEX(Sheet2!B:B,AGGREGATE(15,6,ROW(Sheet2!$E$2:$F$13)/(($B3=Sheet2!$E$2:$F$13)*($C3=Sheet2!$I$2:$I$13)),1))

  11. #11
    Forum Contributor
    Join Date
    03-04-2014
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2019
    Posts
    756

    Re: Index match - finding where two values 1st appear together

    Fantastic. Johnmpl's formula worked well. Is there a way I could do this to look at the last instance the two numbers appear together?

  12. #12
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Index match - finding where two values 1st appear together

    Try this in H3:

    =LOOKUP(2,1/((Sheet2!$E$2:$E$13=$B3)*(Sheet2!$I$2:$I$13=$C3)),Sheet2!B$2:B$13)

    Drag to the right and down.

+ 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 Function for Finding Result in between Two Values with Two Criteria
    By KyleElliott in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-09-2017, 01:19 AM
  2. Index/Match finding sequential values.
    By Sthomson1984 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2017, 01:43 AM
  3. [SOLVED] Index / Match - match 3 input values and return the results from the index
    By t83357 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-08-2016, 07:34 PM
  4. index match, finding multiple values within one cell
    By yumpup in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 11-06-2015, 08:31 AM
  5. Index-Match function not finding matches with newly pasted values
    By murp5972 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-04-2015, 03:44 PM
  6. [SOLVED] Finding second to last value using vlookup match or index match...
    By gr8spot in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 06-20-2015, 03:32 PM
  7. Index/Match Finding Max
    By windme in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-04-2011, 12:41 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