Combining IF Statement and QUARTILE Statement

mr.emunson

New Member
Joined
Dec 10, 2010
Messages
22
I have a column of various percentages and I would like to use the QUARTILE function to get the 50% percentile. The issue I have is that majority of these percentages are zero.

I am looking for a formula to exclude the zeros and compute the 50% quartile of anything non-zero.

My attempt:
=IF(AD8:AD200<>0,QUARTILE(AD8:AD200,2),"")


Any help is very much appreciated, thank you.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Try the following formula, which needs to be confirmed with CONTROL+SHIFT+ENTER...

=QUARTILE(IF(AD8:AD200>0,AD8:AD200),2)
 
Upvote 0
I always love coming to this board for 2 reasons:

1. It warms me to the bones to know I'm not the only one experiencing problems like this; and

2. I know that somewhere out there exists a knowledgeable soul willing and able to help me solve my problems.

This post clearly stated exact issue I was having, and the solution offered worked perfectly for me, too.

Thank you!!!
 
Upvote 0
Hi,

I'm using the formula below. But if M5 is a zero, i need it to be excluded from the quartile ranking. Possible?

=MATCH($M5,QUARTILE($M$5:$M$17,{4,3,2,1}),-1)
 
Upvote 0
What do you want the formula to return when M5 is a zero? To return #N/A, try...

=IF($M5=0,#N/A,MATCH($M5,QUARTILE($M$5:$M$17,{4,3,2,1}),-1))
 
Upvote 0
How does it work when we need the quartile function to be performed based on values in another column? For example column A has cities and column B has population but I need the quartile function to be performed on population but only in certain cities? Thanks
 
Upvote 0
I am working on a similar formula but need to cluster the Quartile statement so I can calculate each value as it relates to the total array. My issues is with the Sum of Sales Hits column it is taking the zero values into account and skewing the product ranking quartile formula.

Formula for Sum of Sales Hits: PRODUCT Ranking

=IF(V2<=0,"D",IF(AND(V2<>0,(V2>QUARTILE($V$2:$V$1990,3))),"A",IF(AND(V2<>0,(V2>=QUARTILE($V$2:$V$1990,2))),"B",IF(AND(V2<>0,(V2>=QUARTILE($V$2:$V$1990,1))),"C",IF(AND(V2<>0,(V2>=QUARTILE($V$2:$V$1990,0))),"D")))))
 
Upvote 0
For example i have column A having values from 1 to 12; multiple 1,2,3 etc (representing months) and column B having production data and i want to calculate the QUARTILE with condition of month 1, month 2, month 3 etc. how to to do?
 
Upvote 0

Forum statistics

Threads
1,223,929
Messages
6,175,455
Members
452,643
Latest member
gjcase

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top