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

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
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,214,586
Messages
6,120,402
Members
448,958
Latest member
Hat4Life

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