Try

=INDEX(DataArray!B:B,IFERROR(MATCH(D:D,DataArray!A:A,0),IFERROR(MATCH(B:B,DataArray!A:A,0),MATCH(AA,DataArray!A:A,0))))