In Column B of my current workbook I'm using this function:

=IFERROR(IFERROR(VLOOKUP(A2,LookupBook,9,FALSE))
This looks up the task number in A2 of my current workbook against the same task number in a workbook called "LookupBook" & returns a date the task was done.

However, "LookupBook" will have the same task number multiple times.

At present its looking up the first occurrence of that task number in "LookupBook" and returning that date when I need the date for the most recent occurrence of that task number instead.

Can anyone advise how to modify this function to look up the most recent date from "LookupBook" associated with that task.

Any help would be deeply appreciated.

I'm using Excel 2007.