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.
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

jeffreybrown

Well-known Member
Joined
Jul 28, 2004
Messages
5,145
It worked for me.

Did you enter the {} manually or did you commit the formula with Ctrl + Shift + Enter
 

pplstuff

Well-known Member
Joined
Mar 9, 2012
Messages
951
Tested, works for me (using D:D and specific ranges). Use put {} in your example, I'm assuming you hit crtl+shift+enter?
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
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)))
 

bloodybrit90

Board Regular
Joined
Jul 18, 2011
Messages
111

ADVERTISEMENT

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.
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
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)))
 

Watch MrExcel Video

Forum statistics

Threads
1,123,367
Messages
5,601,214
Members
414,434
Latest member
Riyen

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
Top