Working with Quartiles

AbleAndy_UK

New Member
Joined
Oct 15, 2017
Messages
4
Good Morning all. I am trying to find out if it is possible to work with data in quartiles. So, if I had a list of salary data attached to Male and Female employees I know I can find out what each of the Quartiles are, but is there a way to say in the top quartile there are 55% Male and 45% Female?
Thank you in advance
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hello AbleAndy_UK, welcome to MrExcel

Say you have salaries in B2:B20 and C2:C20 shows "F" or "M" then you could get the % of Females in the top quartile with this array formula

=AVERAGE(IF(B2:B20>=QUARTILE(B2:B20,3),IF(C2:C20="F",1,0)))

confirmed with CTRL+SHIFT+ENTER
 
Upvote 0
Barry, thank you for your response that was very quick :) It works great, can I confirm that to do the same for each quartile I amend the IF(C2:C20="F",1,0) to 2,0 / 3, 0 / 4,0 etc?
Thanks again

 
Upvote 0
Barry, I found the way to change the quartile (QUARTILE(B2:B20,3) but the numbers I get don't match what I would expect:

5c8260e9-6b5c-47b0-a49d-0daff170defc


Thanks, Andy.
 
Upvote 0
Sorry, it's easier for the top one, for the next quartile down you need add an "IF" so that it's >=2 but <3, i.e.

=AVERAGE(IF(B2:B20>=QUARTILE(B2:B20,2),IF(B2:B20< QUARTILE(B2:B20,2),IF(C2:C20="F",1,0))))
<quartile(b2:b20,3),if(c2:c20="f",1,0))))

You can do the same for >= 1 and < 2

and for the bottom quartile it can be simply < 1</quartile(b2:b20,3),if(c2:c20="f",1,0))))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,746
Messages
6,126,639
Members
449,325
Latest member
Hardey6ix

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