Reputation: 25
I'm trying to create an averageifs statement that will go through a dataset and for each month, calculate the average (ignoring zero values) of two different columns). I'm not sure how to add a sample dataset to this question?
=averageifs(b:b, ">0", c:c, "Fresh") ... yields "you've entered too few arguments for this function."
also tried: =averageifs(b:b, ">0", a:a, e2, c:c, f1) ... same result
One can be downloaded from here: https://image-files-manausa.s3.us-west-2.amazonaws.com/Stack_Overflow_Example.xlsx
A screen capture is below:
Upvotes: 0
Views: 57
Reputation: 25
I added a few named ranges to keep my head from spinning. This is a working solution:
=IFERROR(AVERAGEIFS(Time,Time,">0",Dates,">="&E2,Dates,"<="&EDATE(E2,1),Type,$F$1),"")
Where Dates is a2:a35 Time is b2:b35 Type is c2:c35
Upvotes: 0
Reputation: 8385
Just to show 3 ways of setting criteria in averageifs() or any of the xxxifs() functions:
I use the 3rd version where a cell is referenced as that is the most flexible.
Upvotes: 1