Conditional Median

W

warburger

Hello,

I am a newbie here.

I would just like to ask questions that has been bugging me for about a
month now.

1. How do I get the median of a row or a column without including the
zeroes? (This will affect my result)

2. How do I get the median specifying some conditions? (i.e. I only
want to get the median of column 2 if its corresponding column 1 meets
my conditions)? Further example - I have a database, column 1 lists the
fruit types (apples, oranges etc.) column 2 lists the percent sugar
content. Now I only want to get the median of the apples....

3. Finally, can I make a syntax that will combine my query 1 and query
2 (Multiple conditions) So far, I've only succeeded in doing both
separately, not combining them in one syntax.

Please help me...

Many thanks...

lex
 
D

Domenic

1. How do I get the median of a row or a column without including the
zeroes? (This will affect my result)

=MEDIAN(IF(B2:B10>0,B2:B10))

....confirmed with CONTROL+SHIFT+ENTER
2. How do I get the median specifying some conditions? (i.e. I only
want to get the median of column 2 if its corresponding column 1 meets
my conditions)? Further example - I have a database, column 1 lists the
fruit types (apples, oranges etc.) column 2 lists the percent sugar
content. Now I only want to get the median of the apples....

=MEDIAN(IF(A2:A10="Apples",B2:B10))

....confirmed with CONTROL+SHIFT+ENTER
3. Finally, can I make a syntax that will combine my query 1 and query
2 (Multiple conditions) So far, I've only succeeded in doing both
separately, not combining them in one syntax.

=MEDIAN(IF(A2:A10="Apples",IF(B2:B10>0,B2:B10)))

....confirmed with CONTROL+SHIFT+ENTER

Hope this helps!
 
W

warburger

You have no idea how grateful I am.....:)

Many thanks bro....I really am thankful...this solves my problem....:)

:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top