Salary - medianifs and quartileifs in excel mac

akswartz85

New Member
Joined
Mar 31, 2010
Messages
49
Hi, I'm trying to calculate the median salary based on a set of conditions - job code = 42, school type = single site.

Sample data:

<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}@page {margin:.75in .7in .75in .7in; mso-header-margin:.3in; mso-footer-margin:.3in;}tr {mso-height-source:auto;}col {mso-width-source:auto;}br {mso-data-placement:same-cell;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:black; font-size:11.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Calibri; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}.xl65 {color:white; font-size:10.0pt; font-weight:700; background:#0070C0; mso-pattern:#0070C0 none;}.xl66 {font-size:10.0pt;}.xl67 {font-size:10.0pt; mso-number-format:"\0022$\0022\#\,\#\#0";}.xl68 {font-family:Calibri, sans-serif; mso-font-charset:0;}--></style>[TABLE="width: 261"]
<!--StartFragment--> <colgroup><col width="87" span="3" style="width:65pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 87"]Updated Job Code[/TD]
[TD="class: xl68, width: 87"]Average Salary[/TD]
[TD="class: xl68, width: 87"]Type[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]42[/TD]
[TD="class: xl67, align: right"]$60,000[/TD]
[TD="class: xl68"]Single site[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]42[/TD]
[TD="class: xl67, align: right"]$26,000[/TD]
[TD="class: xl68"]Single site[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]42[/TD]
[TD="class: xl67, align: right"]$26,500[/TD]
[TD="class: xl68"]Multi site[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]40[/TD]
[TD="class: xl67, align: right"]$62,000[/TD]
[TD="class: xl68"]Single site[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]49[/TD]
[TD="class: xl67, align: right"]$40,000[/TD]
[TD="class: xl68"]Multi site[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]42[/TD]
[TD="class: xl67, align: right"]$45,000[/TD]
[TD="class: xl68"]Multi site[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]21[/TD]
[TD="class: xl67, align: right"]$33,000[/TD]
[TD="class: xl68"]Single site[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]43[/TD]
[TD="class: xl67, align: right"]$30,000[/TD]
[TD="class: xl68"]Multi site[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]42[/TD]
[TD="class: xl67, align: right"]$51,500[/TD]
[TD="class: xl68"]Single site[/TD]
[/TR]
<!--EndFragment--></tbody>[/TABLE]


How do I do that? I've been playing with median(if()) combinations but can't seem to get it.

I also have the same question but with quartiles...

Thanks!
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Try:
These are array formulas that must be entered with CTRL-SHIFT-ENTER.
Excel Workbook
ABCDEFG
1Updated Job CodeAverage SalaryTypeUpdated Job CodeTypeMedian
242$60,000Single site42Single site$51,500
342$26,000Single site
442$26,500Multi site1st Quartile
540$62,000Single site$ 38,750.00
649$40,000Multi site
742$45,000Multi site
821$33,000Single site
943$30,000Multi site
1042$51,500Single site
Sheet
 
Upvote 0
Thanks. I'm on a mac - excel 2016 - and I can't get it to calculate the array. Is there a different shortcut?
 
Last edited:
Upvote 0
Not sure on the MAC, but I think it might be COMMAND-SHIFT-RETURN. You will first need to put the formula in edit mode (which is function key F2 on a PC may be the same on mac??).
 
Upvote 0
I also, assumed that the Job Codes were numeric. If the job codes are text then you will need to enter cell E2 (in the example) as text.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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