I need a formula or array that will look up the last time a specific thing occured.

A1:A1000 has the date it occured
B1:B1000 has the thing that occured

A1001 is where I want the formula or array to display the answer
B1001 will be the occurance I enter to be looked up

Thanks, John