=MEDIAN(A1,10,20)
I assume that you don't actually mean "above 10", but that you mean "greater
than or equal to 10", and that you don't actually mean "below 20" and that
you mean "less than or equal to 20".
With the same assumptions, an alternative would be
=IF(A1<10,10,IF(A1>20,20,A1)) and another alternative would be
=MAX(10,MIN(A1,20))