The criteria for deciding what is extreme is key to answering your question.
However, 1 way:-
=AVERAGE(IF((A1:A10>=2)*(A1:A10<=8),A1:A10))
The above looks at the range A1 - A10 and averages the numbers in the range
that are >=2 and <=8. It's an array entered with CTRL + Shift + enter.
The 'average' bit could simply be changed to whatever calculation you are
trying to do.
Mike