0

All,

I have the following equation: {=MEDIAN(IF(INDIRECT($F$80)=A87, INDIRECT($E$80))}

Where F80 = "input!Q2:Q545" and where E80 = "input!B2:B545"

Basically this formula finds the median of one column where the other column is a set value (found in cell A87).

Can I write this as a non-array formula (without curly brackets)

Thanks, -Rik

1
  • have you just tried? Commented Jul 22, 2015 at 11:52

2 Answers 2

3

If you have Excel 2010 or later:

=AGGREGATE(16,6,INDIRECT($E$80)/(INDIRECT($F$80)=A87),1/2)

If not:

=MEDIAN(IF(MMULT(0+(INDIRECT($F$80)=A87),1),INDIRECT($E$80)))

Regards

Sign up to request clarification or add additional context in comments.

2 Comments

Any idea how to do modify the aggregate function to be the mode vs median?
Unfortunately that cannot be done so readily with the AGGREGATE set-up. Though the MMULT set-up is easily adapted for the MODE.
1

This formula will not work in 1 cell if it is not an array formula. This is because the IF statement is used against multiple cells. To write this without an array formula you would need to put an individual formula in each cell from R2:R545 which says:

=if(Q2=$A$47,B2)

And then a cell at the bottom that says: =median(R2:R545)

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.