OR
=CHAR(AVERAGE(IF(ISNUMBER(CODE(A1:A5)),CODE(A1:A5),"")))
Also an array function so use CNTRL SHFT ENTER

Note: Your formula (and these formula's) seem flawed as if there is even 1 A and 4 B's, the result is A. Is that an issue?