Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Median of Selected Numbers.
by Allen Wyatt
(last updated April 14, 2016)
William is trying to find the median of about 3,000 numbers in a column that has a range from 0.9 to 5. However, he only wants the median of numbers that are greater than 1. He can't figure out how to put that parameter into his formula and is looking for ideas.
Short of creating a user-defined function in a macro, there are a couple of ways you can go about determining the median. One method is to use an intermediate column that contains only those values above 1 and then calculate the median based on those values. You could also use an advanced filter to extract only the values above 1 and then use those values to find the median.
A better approach, however, is to use a simple array formula:
When you enter this as an array formula (by using Ctrl+Shift+Enter), the result is your median value, with your criteria taken into account.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7922) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Median of Selected Numbers.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
Want to return more than a value when doing a lookup? Here are a couple of ways to do it by adding an IF clause to your ...Discover More
Some users have reported problems using the EOMONTH function in later versions of Excel, beginning with Excel 2007. The ...Discover More
Need to know which week of the year a particular date falls within? Excel provides the WEEKNUM function so you can easily ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.