Median IF range of data

dstreff

New Member
Joined
Sep 12, 2017
Messages
2
I am trying to take the median of a range of values, filtered by the number in the limit column.

As small subset of the data is below.

For example, I need to write a function that finds the median of all the values for records with a Limit of 500.

In this subset of data the function should return 2590

I tried using =MEDIAN(IF(F2:F5=500,B2:E5)) and using the Ctrl+Alt+Enter method for arrays, but got the wrong answer.

Any help would be much appreciated.

RecordValue 1Value2Value3Value4Limit
1139214962638500
21412149626431000
31520153826583036500
420622590382610842500

<tbody>
</tbody>
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Its because the blank cells will count as a zero:

=MEDIAN(IF(F2:F5=500,IF(LEN(B2:E5)>0,B2:E5)))
 
Upvote 0

Forum statistics

Threads
1,215,530
Messages
6,125,350
Members
449,220
Latest member
Edwin_SVRZ

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