median ifs

surfsoc

New Member
Joined
Sep 28, 2008
Messages
39
Hi,

I am using this formula:
{=MEDIAN(IF(AND(codes=$H4,investor_type=$U$2),FUM))}, where codes, investor_type and FUM are named ranges of equal size.

The response is not an error but 0 - what is going wrong? or is there a simpler method for conditional median calculations?

Ed
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi,

Try this

=MEDIAN(IF(codes=$H4,IF(investor_type=$U$2,FUM)))
Ctrl+Shift+Enter

HTH

M.
 
Upvote 0
If you have an array argument Median ignores text and blanks but counts zeros - so what may be happening is your IF is being read as Zero when it evaluates as FALSE - hence you are getting an array with lots of zeros and the median value is zero. You could try to modify it so you put in some text as the answer for FALSE (e.g. " ") to see if that works - it certainly wont hurt!
 
Upvote 0
AND doesn't work in an array formula. You can multiply instead.

{=MEDIAN(IF((codes=$H4)*(investor_type=$U$2),FUM))}
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,865
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