View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Lori Miller Lori Miller is offline
external usenet poster
 
Posts: 64
Default How can I find a median?

With the (unordered) data set in the range A3:B36, try either of these:

=MEDIAN(IF(COLUMN(A:IV)<=B3:B36,A3:A36))

(returns 5 if executed with CTRL+SHIFT+ENTER but assumes
ALL frequencies <=255, but could be extended in XL2007.)

=LOOKUP(2,1/FREQUENCY(0.5,PROB(A3:A36,B3:B36/SUM(B3:B36),,A3:A36)),A3:A36)

(returns 5 also - finds the halfway mark in the cumulative frequencies.)