Issue with Advanced Conditional Array to Determine Median Absolute Deviation

Aimee S.

Board Regular
Joined
Sep 28, 2010
Messages
236
Office Version
  1. 365
Platform
  1. Windows
Hello Folks.

So I am able to (using CTRL SHIFT ENTER) use the following that conditionally calculates the basic Median of a range based on two criteria:

{=MEDIAN(IF($H$4:$H$300000=$H4,IF($K$4:$K$300000=$K4,$L$4:$L$300000)))}

I drag this down and have no issues.

However, when I try to implement the median absolute deviation flavor of this I am getting incorrect results. I am sure the syntax is my issue and it is a PEBCAK thing :)

The basis for M.A.D. is =MEDIAN(ABS(range of values - MEDIAN(range of values)))

The range of values for me is $L$4:$L$300000

The conditions that need to be met to restrict the range of values considered depending on the row are:

$H$4:$H$300000=$H4

$K$4:$K$300000=$K4

Please help!!! I tried the following but it is wrong. :( I am sure it has to do with the conditions not being set to restrict the range that the ABS function is considering to match the MEDIAN.

{=MEDIAN(ABS($L$4:$L$300000 - MEDIAN(IF($H$4:$H$300000=$H4,IF($K$4:$K$300000=$K4,$L$4:$L$300000)))))}
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
It will be that you need this:

Book1
AHKLM
1
3
4x1y1-14
5x2y22
6x1y13
7x4y44
8x1y1-5
9x6y66
10x1y17
sheet
Cell Formulas
RangeFormula
M4M4{=MEDIAN(IF($H$4:$H$10=$H4,IF($K$4:$K$10=$K4,ABS($L$4:$L$10))))}
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
 
Upvote 0

Forum statistics

Threads
1,213,544
Messages
6,114,239
Members
448,555
Latest member
RobertJones1986

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