View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default how to get the median of cells that meet a given criteria in excel

Try

=MEDIAN(IF(B1:B1010,B1:B10,FALSE))

Which is an arry so enter with CTRL+Shift+Enter and not just enter. If you
do it correctly Excel will put curly barckets {} around the formula. You
can't type these yourself

Mike

"drs207" wrote:

Hi,

Exel, in addition to the AVERAGE function, has the AVERAGEIF or AVERAGEIFS
function to calculate the average value of cells that meet a given set of
criteria.

However, the MEDIAN function can't seem to do anything except calculate the
median value of all cells in a column.

Is there some kind of "MEDIANIF" function that I can use to calculate the
median value of cells that meet a given criteria. If not, is there a way to
get the answer programmatically?

Thanks in advance for your help.