Compare unique values with multiple columns and return the most recent

Rodri

New Member
Joined
Aug 30, 2014
Messages
4
ABCD
1FruitListDateCondition
2BananaBanana02/05/2010Good
3TomatoBanana02/05/2011Good
4OrangeBanana02/05/2012Bad
5LemonTomato02/05/2014Excellent
(always unique)Tomato02/05/2010Good
Banana02/05/2014Available

<tbody>
</tbody>


I would like to compare one-by-one the items in column A with column B, then return what's in column D for the most recent date in column C for that item.

E.g.: For "Banana" (A2) - Result = Available

For "Tomato" (A3) - Result = Excellent

I tried some INDEX with MATCH, but I can't get the correspondent MAX value.


Thanks

 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Rodri, Good evening.

Try to use:

=INDIRECT("D"&SUMPRODUCT(($B$2:$B$7=$A$2)* ($C$2:$C$7= MAX($C$2:$C$7,1)) * ROW($D$2:$D$7)),1)

Is it what you want?
I hope it helps.

Have a nice weekend.
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,500
Members
449,090
Latest member
RandomExceller01

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
Back
Top