0

I need to calculate the MEDIAN of the rows matching some conditions.

Conditions are in the rows A, B, C and D and my infos are in a table called classic_v2_log. When I'm using the Sheet Name it works:

=MEDIAN(IF((ClassicRAW!B:B=A35)*(ClassicRAW!C:C=B35)*(ClassicRAW!D:D=C35)*(ClassicRAW!E:E=D35),ClassicRAW!F:F))

But if I try to use the Table reference it gives me a #N/A and if I try to use the Show Calculation Steps it goes beyond the Table.

I'm trying something like this and it's not working:

=MEDIAN(IF((classic_v2_Log[ [ Epochs] ]=A35),ClassicRAW!F:F))

I am confirming the formula with Ctrl+Shift+ENTER to make it as an array-formula.

4
  • Your ranges probably need to be the same size. Commented Nov 29, 2018 at 9:55
  • But when I'm doing =MEDIAN(IF((classic_v2_Log[ [ Epochs] ]=A35),ClassicRAW!F:F)) it's just one range and the #N/A is still there. Commented Nov 29, 2018 at 10:23
  • But the first range is part of a table, say 50 rows, and the second reference is a whole column (outside the table?). Make it the same and that should work. Commented Nov 29, 2018 at 10:29
  • 1
    It worked! Thanks, can you please write it as an Answer so I can set it as the solution? Commented Nov 29, 2018 at 12:12

1 Answer 1

1

The essential point is that the two ranges (arrays) need to be the same size. If one of the ranges is in a table and the other isn't you will have to ensure the second is the same number of rows as the first.

For example, if your table ran from row 2 to row 50:

=MEDIAN(IF((classic_v2_Log[ [ Epochs] ]=A35),ClassicRAW!F2:F50))
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.