Alternatively you could use the Large and Small functions

=Large(a1:A30,1)
=Small(A1:A30,1)