Hi all!
I have a little problem with a formula in a work document.
It is a document that shows figures for each day of the year with week, month and year total summaries. Some columns in this document calculates averages.
For the Weekly summaries i am using the following formula:
=IFERROR(IF(COUNT(B1,B4,B5,B6,B7,B8,B9),AVERAGEIF((B1:B4:B9),"<>0"),0),0)
This is for two reason:
1. I don't want the #DIV/0! error to be displayed when the average is calculated for empty cells so that the week, month and year totals always displays values.
2. I want "0" and blank cells to be excluded from the calculations.
The problem i have is that when a week spans two months, the RANGE in the formula must be split into two (because the month summary is in between) and for the "IF(COUNT" part in the above formula i can just use commas to define each cell instead of two ranges.
BUT, i cannot find a way to define multiple cells or ranges with "AVERAGEIF". I tried using commas as with COUNT and i also tried using it with "AVERAGEIF((B1:B4;B9)" which gave an error and suggested me to change it to "B1:B4:B9" which doesn't calculate correctly.
See the example file attached.
I really hope someone has a good solution or info to point out what i might be doing wrong
Also, if suggesting an entirely different kind of formula, the important steps are:
1. Calculate Average excluding "0" and blank cells.
2. Show a value of "0" if an error is the result.
3. Be able to define multiple cells or ranges.
Bookmarks