Median using if/and statement

mark91345

Board Regular
Joined
Feb 11, 2011
Messages
113
I just can't figure out why my median formula isn't working. I am trying to get the median annual return, based on "groupings" of distances. For example, since A2:A5 are <= 50 miles and are also > 0, I want Excel to give me the median annual return for B2:B5 (which is 0.27).
Help!

Excel 2012
ABCDE
1Distance in MilesAnnual ReturnDISTANCES GROUPEDMEDIAN ANNUAL RETURN
210.150
3220.33500.00000
4480.33100
5490.21150
681-0.11200
7950.71250
81250.88300
91280.06
10138-0.03
111551.67
121560.14
131680.40
141730.03
151860.26
161920.38
171940.29
182650.48
192750.20
202880.29
212970.91

<tbody>
</tbody>
forMrExcel
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
=MEDIAN(IF(AND($A$2:$A$21>D2,$A$2:$A$21<=D3),$B$2:$B$21))

<colgroup><col width="453"></colgroup><tbody>
</tbody>

(Sorry about that! Don't know why it didn't copy over the first time).


What is the formula you are using?
 
Upvote 0

Forum statistics

Threads
1,215,463
Messages
6,124,965
Members
449,201
Latest member
Jamil ahmed

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