You might be outsourcing tasks to AI that Excel already handles better.
Most Excel lookup functions return the first match, but XLOOKUP can reverse the search direction to return the latest record.