We are in the process of updating the site, so some pages still have the older design.
How to average non-contiguous cells (cells that aren't next to each other) if those cells contain numbers and are greater than 0.
The regular AVERAGEIF() function will not work in this case; try it if you don't believe me!
This assumes that you have some cells around your spreadsheet that are not together in a single range.
So, let's say that we want to average cells A1,A5, and B2 so long as each cell contains a number and that number is greater than 0.
Use this formula:
=SUM(A1,A5,B2)/INDEX(FREQUENCY((A1,A5,B2),0),2)
To make this work for you, just replace the cell references A1,A5,B2 with the cells that you want to average.
There is really no point in explaining this function; it just works.
Here is the function in Excel:

Doing this relatively simple task requires an annoying formula in Excel. Currently, there isn't much you can do about this, so just use the formula above and you will be good to go.
Download the spreadsheet attached to this tutorial to see this example in Excel.
Follow along with the tutorial by downloading the files used in it. (Completely Free)
Phone number is optional - we use it to send course discounts and weekly updates via SMS.