Formula for "Median IF" and "Trimmean IF&quot

ncody

New Member
Joined
Apr 7, 2004
Messages
19
I have an excel worksheet (Results) that has a rating (in column F), and core deposits/total assets ratio in (column N). I am trying to create a summary worksheet that will provide the following:

1 rating median core deposits/total assets ratio
2 rating median core deposits/total assets ratio
3 rating merdian core deposits/total assets ratio
4 rating median core deposits/total assets ratio
5 rating median core deposits/total assets ratio

I tried the following formula for the 1 rated for median and it didn't work:

=MEDIAN(IF(Results!F2:F2000=1,L2:L2000))

I tried the following formula for the 1 rated for trimmean and it also didn't work:

=Trimmean(IF(Results!F2:F2000,L2:L2000),.1)

Any suggestions for how to write the formula so that it works?
 
Here are 30 rows from the data. Column B is the rating and Column C are the ratios I want to use to calculate median and trimmean.
2Problem Formula Report_9120051428394839731.xls
ABCD
1Sequence #COMM`L LIQ RT (0P)CORE DEPS / TOT ASSETS (2003Q4)
21157.11
32123.86
43157.30
54177.22
65170.96
76180.51
87254.32
98261.82
109288.42
1110183.49
1211254.68
1312272.07
1413281.70
1514281.75
1615272.76
1716163.15
1817260.27
1918283.27
2019172.84
2120182.69
2221269.80
2322182.03
2423167.11
2524142.40
2625176.80
2726178.56
2827175.06
2928163.93
3029152.21
Results


I would expect median for the 1-rated to be 71.90. I would expect trimmean for the 1-rated using .1 to be 67.07.

I would expect median for the 2-rated to be 72.07. I would expect trimmean for the 2-rated using .1 to be 70.99.
 
Upvote 0
ncody said:
Here are 30 rows from the data. Column B is the rating and Column C are the ratios I want to use to calculate median and trimmean.

...

I would expect median for the 1-rated to be 71.90. I would expect trimmean for the 1-rated using .1 to be 67.07.

I would expect median for the 2-rated to be 72.07. I would expect trimmean for the 2-rated using .1 to be 70.99.
Book7
ABCDEFGHIJ
1Sequence #COMM`L LIQ RT (0P)CORE DEPS / TOT ASSETS (2003Q4)mediantrimmean
21157.11171.967.06833
32123.86272.0770.98727
43157.3
54177.22
65170.96
76180.51
87254.32
98261.82
109288.42
Sheet1


H2:

=MEDIAN(IF($B$2:$B$30=G2,$C$2:$C$30))

which is confirmed with control+shift+enter then copied down.

I2:

=TRIMMEAN(IF($B$2:$B$30=G2,$C$2:$C$30),0.1)

which is confirmed with control+shift+enter then copied down.
 
Upvote 0
Thanks so much - it worked. I guess pointing to a cell for the rating values works whereas entering the rating values doesn't work.
 
Upvote 0

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