PivotTables do not allow median function. We will create a helper column and use an array function to calculate the median in a PivotTable. Also shown are average, median, averageif, if statement with the median function.
The median function finds the middle number in a range. If you have an odd number of numbers (3, 7, 15 numbers) it will find the middle number. If you have an even number of numbers, (2, 14, 28) if will find the two middle numbers and average them.
Functions used in the video above
- Average – Returns the average (arithmetic mean) of the arguments. For example, if the range A1:A20 contains numbers, the formula =AVERAGE(A1:A20) returns the average of those numbers.
- Median – Returns the statistical median (the middle value) of a list of supplied numbers.
- Array Function
- AverageIf – returns the average (arithmetic mean) of all numbers in a range of cells, based on a given criteria. The AVERAGEIF function is a built-in function in Excel that is categorized as a Statistical Function.
There is no medianif function so we nested the median function with an if statement and made it an array function.
Upcoming Excel Events with Chris Menard in Atlanta
- Administrative Professional Day Conference on April 20, 2018
- Georgia Society of CPAs conference in August 2018 – Cobb Galleria