View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Median If in Excel not working

Hi,

Am Fri, 29 Jul 2011 08:49:21 -0700 (PDT) schrieb Ronen Hefetz:

I am trying to do a conditional median in Excel. I have 2 columns that
looks like this:

I J
2/7/2011 5
4/6/2011 6.4
5/10/2011 4.4
7/6/2011 4.7
8/23/2011 4.8
9/20/2011 11.8
9/20/2011 4.8
10/4/2011 6.3

I want the median of the cells in B1 where the date in A1 is prior to
today, held in cemm M1.


try:
=SUMIF(I2:I50,"<"&$M$1,J2:J50)/COUNTIF(I2:I50,"<"&$M$1)


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2