So in the above example for the first item I want the latest date to be 17th July
For pre-xl2010 use a psuedo-MAXIFS.
=MAX(INDEX($B$2:$B$20+($A$2:$A$20<>A2)*-1e99, , ))