This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)
This will average only the numbers in A1:A10 that are greater than 17.
(I'm not quite sure how to translate your example, though.)