Forum Discussion

jpm_365's avatar
jpm_365
Copper Contributor
May 24, 2019

Finding the last instance of a data combination

I need to index match based on the last instance of a combination of data elements.  In the attached example, I want to match the Units (col D) for the last instance of each combo of Name (col B) and Stock (col C).  This table is small, the real one is thousands of combinations.  I haven't had any luck figuring this one out on my own!  Thank you!

3 Replies

  • Twifoo's avatar
    Twifoo
    Silver Contributor
    You may try this formula in I2, copied down rows:
    =LOOKUP(PI(),
    1/((B$2:B$100=G2)*
    (C$2:C$100=H2)),
    D$2:D$100)

Resources