Lookup latest item with index match

Bozo the C

New Member
Joined
Sep 25, 2016
Messages
33
Hello a good day!


I would like to look up values in a table with multiple criteria (2).
Then i want to retun the item with the latest start date.


Could you please help me with this?


ABCDEFGH
1
2
3IDProductValueStart
41111101-jan-16IDResult
5122251-jan-1615
6122251-jun-1625
7211151-jan-1638
8222251-jan-16
9222271-mei-16
10222251-okt-16
113111101-jan-16
12311171-mei-16
13322281-jan-16

<tbody>
</tbody>


I want the value of product 222 with the latest start date in cell H5, H6, etc. for each ID.


CellFormula
H5{=INDEX($D$4:$D$13,MATCH(G5&222,$B$4:$B$13&$C$4:$C$13,0))}
H6{=INDEX($D$4:$D$13,MATCH(G6&222,$B$4:$B$13&$C$4:$C$13,0))}
H7{=INDEX($D$4:$D$13,MATCH(G7&222,$B$4:$B$13&$C$4:$C$13,0))}

<tbody>
</tbody>
 
Last edited:

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

AhoyNC

Well-known Member
Joined
Oct 10, 2011
Messages
5,188
Office Version
  1. 365
Platform
  1. Windows
Try:
This is an array formula that must be entered with CTRL-SHIFT-ENTER (command-return on MAC).
Excel Workbook
ABCDEFGH
1********
2********
3*IDProductValueStart***
4*1111101-Jan-16*IDResult
5*122251-Jan-16*15
6*122251-Jun-16*25
7*211151-Jan-16*38
8*222251-Jan-16***
9*222271-Mar-16***
10*222251-Oct-16***
11*3111101-Jan-16***
12*311171-Mar-16***
13*322281-Jan-16***
Sheet
 
Upvote 0

AhoyNC

Well-known Member
Joined
Oct 10, 2011
Messages
5,188
Office Version
  1. 365
Platform
  1. Windows
You're welcome. Thanks for the feedback
 
Upvote 0

bosco_yip

Well-known Member
Joined
Dec 2, 2002
Messages
1,947
Office Version
  1. 2019
Platform
  1. Windows
In H5, non-array formula copy down:

=LOOKUP(9.99E+307,D$4:D$13/(B$4:B$13=G5)/(C$4:C$13=222))

Regards
 
Upvote 0

Bozo the C

New Member
Joined
Sep 25, 2016
Messages
33
Hello Bosco, thanks, your formula is interesting. But it's looking voor the last record. I want the latest record.
I think you need MAX for finding the biggest date (column E).
 
Upvote 0

Forum statistics

Threads
1,191,076
Messages
5,984,495
Members
439,893
Latest member
johnsboxftm

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top