Like this...

=IF(O7=INDEX($D13:$D100,COLUMNS($A1:A1)),IF(INDEX($F13:$F100,COLUMNS($A1:A1))="successful","Successful Discovery Well","Unsuccessful Discovery Well"),"No Drill")

Adjust for the end of ranges where I use down to D100 and F100.