Home » excel » IF Statement nested in MEDIAN Function not generating list in Excel

IF Statement nested in MEDIAN Function not generating list in Excel

Posted by: admin April 23, 2020 Leave a comment

Questions:

I’m working on some statistics for some classes at my school.
I’m trying to have a formula that will calculate the median of ratings for the different classes. My formula I have is:

=MEDIAN(IF(Table1[Class]="AR",Table1[Rating]))

But I can not figure out why the IF statement doesn’t output correctly into the MEDIAN Function.

From what I understand, the IF statement should look through column A’s list of classes and see if they are “AR”, if they are, they should output that value, if not, then output nothing. (I am aware that the output of nothing is not possible and it will output 0.)

If anyone could help, that would be great!

Picture of Formula In Action

Excel File

How to&Answers:

Thanks to the help from Scott Craner, the answer is to press CTRL+SHIFT+ENTER when you are finished typing the formula. This will allow the IF statement to be able to output more than one value into the median function, this process is also known as an array.