Thanks you guys, that is what I was looking for. I did find an instance where it was not returning the expected result though. For example if the data set is {2,1,0,0,0,0} then this formula will return the result "0.5" but what I would like it to return would be the value "1" (it is taking the average of all the values since the 50th percentile is "0" instead of just the first three like I would like). Could I use a different formula to just take the average of the top half of the values instead of >= 50th percentile? The numbers might not be in order so that might make it more challenging. What do you think?