Median with conditions

Berrett

Board Regular
Joined
Aug 6, 2004
Messages
249
I have a formula that says this:

{=MEDIAN(IF($F$5:$F$50="n",I5:I50))}

This works fine for what I'm doing, but if there are no data at all in column "I" for a record that is marked as "n" in column "F" it counts that record as a zero. What can I do to modify this formula so that it returns the median only for those records that are marked as "n" in column "F" and that have data in column "I"?

Thanks.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Try...

=MEDIAN(IF($F$5:$F$50="n",IF(ISNUMBER(I5:I50),I5:I50)))

...confirmed with CONTROL+SHIFT+ENTER.
 
Upvote 0
I have a formula that says this:

{=MEDIAN(IF($F$5:$F$50="n",I5:I50))}

This works fine for what I'm doing, but if there are no data at all in column "I" for a record that is marked as "n" in column "F" it counts that record as a zero. What can I do to modify this formula so that it returns the median only for those records that are marked as "n" in column "F" and that have data in column "I"?

Thanks.
Here's another one...

Still array entered**:

=MEDIAN(IF($F$5:$F$50="n",IF(I5:I50<>"",I5:I50)))

** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.
 
Upvote 0

Forum statistics

Threads
1,224,604
Messages
6,179,857
Members
452,948
Latest member
UsmanAli786

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