Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Median If in Excel not working

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.

I tried =MEDIAN(IF(I2:I50<M1,J2:J50)), but that is returning the
median of all values, whether or not the corresponding value in column
J is prior to the date in M1.

I tried searching the forum, but didn't come up with anything.

Any help would be greatly appreciated.

Thanks in advanced.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,549
Default Median If in Excel not working


Seems to work for me if entered as an array formula by pressing: Ctrl + Shift + Enter
--
Jim Cone
Portland, Oregon USA .
http://www.mediafire.com/PrimitiveSoftware .
(free and commercial excel programs)






"Ronen Hefetz"
wrote in message
...
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.

I tried =MEDIAN(IF(I2:I50<M1,J2:J50)), but that is returning the
median of all values, whether or not the corresponding value in column
J is prior to the date in M1.

I tried searching the forum, but didn't come up with anything.

Any help would be greatly appreciated.

Thanks in advanced.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 829
Default Median If in Excel not working

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


That is the mean (average), not the median.
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 829
Default Median If in Excel not working

"Ronen Hefetz" wrote:
I tried =MEDIAN(IF(I2:I50<M1,J2:J50)), but that is
returning the median of all values, whether or not
the corresponding value in column J is prior to the
date in M1.


That would be the case if I2<M1 by coincidence and you simply pressed Enter
instead of ctrl+shift+Enter.

The above formula should be entered as array formula.

Enter an array formula by pressing ctrl+shift+Enter instead of Enter. Excel
will display an array formula surrounded by curly braces in the Formula Bar,
i.e. {=formula}. You cannot type the curly braces yourself. If you make a
mistake, select the cell, press F2 and edit, then press ctrl+shift+Enter.

While pressing and holding Ctrl and Shift, press Enter. Then release all
three keys.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
median and upper and lower boundry lines in an excel chart? RWS Charts and Charting in Excel 1 September 11th 09 09:13 PM
how to get the median of cells that meet a given criteria in excel drs207 Excel Worksheet Functions 1 July 17th 08 07:26 PM
how do i chart median as line and range as column in excel? Cath247 New Users to Excel 1 December 19th 06 12:12 PM
How to create trend line chart for MEDIAN in Excel? Nitin Gupta Charts and Charting in Excel 2 June 3rd 05 12:57 PM
Summarize by "Median" in the Pivot Table Field for Excel SentientReza Excel Worksheet Functions 2 November 12th 04 07:05 PM


All times are GMT +1. The time now is 11:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"