Quartile and multiple if

G

Guest

I want to do median with multiple columns criteria.

If B2:B1000=2
AND
If C2:C1000=20006

QUARTILE(D2:D1000)

The below returns an error. What am I missing? Thanks in advance.

=QUARTILE(IF(AND(B$2:B$1000=2,C$2:C$1000=2006),D$2:D$1000,1),0)
 
B

Bob Phillips

=QUARTILE(IF((B$2:B$1000=2)*(C$2:C$1000=2006),D$2:D$1000),1)

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
G

Guest

Thanks - it worked perfectly!

Bob Phillips said:
=QUARTILE(IF((B$2:B$1000=2)*(C$2:C$1000=2006),D$2:D$1000),1)

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
B

Bob Phillips

=QUARTILE(IF((B$2:B$1000=2)*(C$2:C$1000=2006),D$2:D$1000,0),1)

still array entered.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
G

Guest

I was using the sort of the same principle for MEDIAN. However, if value is
true, it's still coming up with 0. What am I doing wrong?

Thanks again.

=MEDIAN(IF((B$2:B$1000=2)*(C$2:C$1000=2006),D$2:D$1000,0))
 
D

David Biddulph

Isn't the zero result coming from all the zeros you are getting from the
exception side of your IF statement (i.e. when you don't meet the B and C
conditions)?

Will =MEDIAN(IF((B$2:B$1000=2)*(C$2:C$1000=2006),D$2:D$1000,"")) work for
you (array-entered)?
 
B

Bob Phillips

=IF(SUM((B$2:B$1000=2)*(C$2:C$1000=2006))=0,0,MEDIAN(IF((B$2:B$1000=2)*(C$2:C$1000=2006),D$2:D$1000)))

as aver array-entered

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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