I implemented your code and it gives the most recent records for Larry and Robb, but I'm afraid I haven't been clear enough.
I need to find within each
1) the most recent record (by timestamp) where the AGENT is either Robb or Larry; AND
2) the record (with the same invoice number) that immediately preceded it in the invoice chronology does NOT have Robb or Larry as the AGENT.
The data will support these conditions.
I hope that is clearer.