Angela,
That's exactly what the formula I gave you does. take this shortened set of
data data
Col P Col Q
1 Yes
99 Yes
99999
4 Yes
The formula
=MEDIAN(IF(Q1:Q4="Yes",P1

4,FALSE))
Returns 4 which is the median of 1, 99 & 4
but it only does so if the formula is array entered with Ctrl+Shift+ Enter
If you've entered the formula correctly then I suggest you check your data
are what you think they are.
Mike