How to median values ignore zeros or errors in Excel?
In Excel, when we apply the common formula =MEDIAN(range), it will calculate the median value within a range including zeros, and it will also get error result when is applied in a range which includes error values as below screenshot show. In this tutorial, I am going to talking about how to medina ignoring zeros or errors in Excel.
Recommended Productivity Tools for Excel
Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial
Kutools for Excel: Save 71% of your time and solve 82% Excel problems for you. 300+ advanced tools designed for 1500+ work scenario, make Excel much easy and increase productivity immediately.60-day Unlimited Free Trial
To median a range ignoring zero values, you can apply below formula.
Select a cell that you will put the median result into, C2 for instance, type this formula =MEDIAN(IF(A2:A17<>0,A2:A17)), press Shift + Ctrl + Enter keys. See screenshot:
In the formula, A2:A17 is the range you want to median excluding zeros.
To median range values ignoring error values, you can do as below:
|Kutools for Excel: The 200 functions you must have in Excel, you can free download from here|
Select a cell which you will place the median result into, enter this formula =MEDIAN(IF(ISNUMBER(F2:F17),F2:F17)), press Shift + Ctrl + Enter keys. See screenshot:
In the formula F2:F17 is the range you want to median ignoring errors.
Recommended Productivity Tools
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
To post as a guest, your comment is unpublished.· 1 years agoTHANKS!!!!!!
To post as a guest, your comment is unpublished.· 2 years agoHello, how does one median ignore both zeros and errors at the same time? Thanks
To post as a guest, your comment is unpublished.· 1 years agoSorry, I cannot find a formula to median ignore both zeros and errors, if you want to try, you can apply Kutools for Excel's Select Specific Cells to select and copy the numbers which are greater than zero first, and then ues =MEDIAN() to find the result from the copy. See screenshot: