An actual file with sample data will be far more helpful than text in a post. That way we can put a formula in an actual file, and make sure it works before we give it to you.
Here is one that I have not tested. This is for Excel and I would expect would be compatible with Open Office.
Formula:
=XLOOKUP(MAX(Sheet2!A:A),Sheet2!A:A,Sheet2!D:D)
If Open Office does not support XLOOKUP then
Formula:
=VLOOKUP(MAX(Sheet2!A:A),Sheet2!A:D,4,FALSE)
If Open Office does not support VLOOKUP then
Formula:
=INDEX(Sheet2!D:D,MATCH(MAX(Sheet2!A:A),Sheet2!A:A,0))
If none of those work then someone with Open Office will have to provide a solution.
Bookmarks