Dear Genius fellows
I am facing a challenging data sorting project

I have a 10 person applying for positions ( 25 Available positions)
Each person will have to submit 5 options sorting with priority of selection from 1 to 5
each person have a different birth date and we want to give the priority to the older persons to choose first

I need a formula that will handle this database so the oldest person obviously will win his first option
The second oldest person will win his first option if not already chosen by the first person otherwise he will win his second option
The third person will win his first option if never choose before otherwise his second option if never chosen by 1st and 2nd person ,,otherwise he will win his 3rd option
and going on things will get more complicated until some persons have all their 5 options were taken so it should indicate so invalid result.

Data will look like below :

Name Hire date 1st 2nd 3rd 4th 5th
John 04-04-1977 I L O H J
Mark 09-05-1977 F L O K J
David 07-06-1977 I K G B H
Samantha 08-06-1977 J F N H A
Sara 08-09-1977 I N G D J
sue 14-02-1978 F K I J G
Jack 21-02-1978 M O I E K
lean 09-03-1978 L C D M E
sanjive 09-05-1978 O C B H J
Ali 15-08-1978 B E M A D