Excel: PivotTable with the median function

Posted on:  03/19/2018
Excel: PivotTable with the median function

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

  1. 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.
  2. Median – Returns the statistical median (the middle value) of a list of supplied numbers.
  3. If
  4. Array Function
  5. AverageIf – returns the average (arithmetic mean) of all numbers in a range of cells, based on a given criterion. 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.

Chris Menard

Chris Menard is a certified Microsoft Trainer (MCT) and works as a full-time Trainer at BakerHostetler - one of the largest law firms in the US. He runs a YouTube channel with 900+ technology videos that cover various tools such as Excel, Word, Zoom, Teams, Gmail, Google Calendar, and Outlook. To date, the channel has helped over 20 million viewers. Menard also does 2 to 3 public speaking events every year, presenting at the Administrative Professional Conference (APC), the EA Ignite Conference, the Support Staff Conference, the University of Georgia, and CPA conferences. You can connect with him on LinkedIn at https://chrismenardtraining.com/linkedin or watch his videos on YouTube at https://chrismenardtraining.com/youtube.

Categories