I need to calculate an average of 5 cells, but if a cell is blank or zero, it should neglect this value.
I am not able to get it to work with
=AVERAGEIFS(A10;B13;C5;D6;D8;"<>0")
Does anyone know the correct way to calculate this?
You are looking for "Averageif":
Specifically, you want to use the range that includes possible blanks and then for the criteria use ">0"
=AVERAGEIF(C1:C5,">0")
In the comments for this answer is a discussion about localization. My locale is United States (Excel 2010), so my delimiter between values passed to a function is the comma ,
Performing an averageif function on non-contiguous ranges is possible:
=AVERAGEIF(B1:B1:B3:B3:B5:B5:B7:B7,">0")
For your locale, you might need to adjust delimiters, but the key thing is for the selection of individual cells, use the format "C1:C1:D4:D4" for the individual cells C1 and D4. The engine must be parsing the references as pairs.