Median based on criteria of another cell

bloodybrit90

Board Regular
Joined
Jul 18, 2011
Messages
111
{=MEDIAN(IF('textexport(2)'!J:J>0,'textexport(2)'!F:F))}

I keep receiving 0 when using this formula. I want to take the median of values in column F if the corresponding values in colum J are above 0.

Any ideas why this does not work.
 

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,)
It worked for me.

Did you enter the {} manually or did you commit the formula with Ctrl + Shift + Enter
 
Upvote 0
Tested, works for me (using D:D and specific ranges). Use put {} in your example, I'm assuming you hit crtl+shift+enter?
 
Upvote 0
Do you have >0 values in column F where column J is blank or zero? If there are many of those then you'll get zero as the median, you can exclude blanks like this

=MEDIAN(IF('textexport(2)'!J:J>0,IF('textexport(2)'!F:F<>"",'textexport(2)'!F:F)))
 
Upvote 0
Yes I hit ctrl+shirt+enter.column J has the following array formula =IF(OR($B4&$I4=Sheet1!$F$90:$F$96),'textexport(2)'!$E4,""). would that effect the results?

The formula worked when referencing another column that did not have an array formula.
 
Upvote 0
OK, you probably need something like the formula I posted except with the IF excluding "" in column J, i.e.

=MEDIAN(IF('textexport(2)'!J:J>0,IF('textexport(2)'!J:J<>"",'textexport(2)'!F:F)))
 
Upvote 0

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

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