I need a little help here. Currently I am using this formula:

=IF(COUNTIF(I5:AB5,"F"),"F","P")

to scan the row of cells for the letter "F" and then display "F" in the cell if any are found. What I would like to do is have 3 variables. If "E" is found, display "E", if "F" is found, display "F" and if neither is found, display "P" - how can I do this?

I really appreciate any input.