Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 4
Question median array help

Hi there, this formula made into an array is not excluding empty cells. Any ideas?
{=MEDIAN(IF(A$2:A$50000=A2,IF(B$2:B$50000=B2,C$2:C $50000)))}

column A and column B are categories, column C is the number. I want the median of all rows where a and b are equal, and c is not empty.

in this simple example with only one a+b combo, zy median should return the number 2. Using the array, it is returning 1.5

a b c
-----
z y 1
z y 2
z y
z y 3
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 829
Default median array help

"tmason" wrote:
this formula made into an array is not excluding empty cells.
Any ideas?
{=MEDIAN(IF(A$2:A$50000=A2,IF(B$2:B$50000=B2,C$2:C $50000)))}


Array-enter the following formula (press ctrl+shift+Enter, not just Enter):

=MEDIAN(IF(A$2:A$50000=A2,IF(B$2:B$50000=B2,
IF(C$2:C$50000<"",C$2:C$50000))))

  #3   Report Post  
Junior Member
 
Posts: 4
Smile

figured it out

=MEDIAN(IF((A$2:A$50000=A2)*(B$2:B$50000=B2)*(C$2: C$50000<""),C$2:C$50000))
  #4   Report Post  
Junior Member
 
Posts: 4
Default

but wait: I don't want the median returned for the cases where col C is empty. Now I'm having trouble with that ...

Quote:
Originally Posted by tmason View Post
figured it out

=MEDIAN(IF((A$2:A$50000=A2)*(B$2:B$50000=B2)*(C$2: C$50000<""),C$2:C$50000))
  #5   Report Post  
Junior Member
 
Posts: 4
Default

Quote:
Originally Posted by tmason View Post
but wait: I don't want the median returned for the cases where col C is empty. Now I'm having trouble with that ...
My Lord ... figured that out, too.

I guess I like talking to myself
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 Array [email protected] Excel Worksheet Functions 4 April 9th 08 01:34 PM
Calculating Median Value in a large array willcozz Excel Discussion (Misc queries) 5 December 11th 06 10:21 PM
Median array formula Ciara Excel Worksheet Functions 1 October 4th 06 10:55 AM
MEDIAN() as array function? Henrik Excel Worksheet Functions 6 October 11th 05 11:35 PM
Median of an Array Kris Taylor Excel Programming 1 November 11th 03 12:21 AM


All times are GMT +1. The time now is 12:29 AM.

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"