on-internet
← Community

Average of values in Excel from different cells excluding zero

Stack Overflow ·

I have a set of values that I want to find the average for. The values are in different cells, not near each other. The value of zero should not be considered. E.g. 1 in cell A1 I have 5, in cell C4 I have 7, in cell Z2 I have 0. E.g. 2 in cell A1 I have 5, in cell C4 I have 7, in cell Z2 I have 8. In example 1 the average should be (5+7)/2 In example 2 the average should be (5+7+8)/3 I would like to achieve this using Excel functions with no hard coding of any values. I am aware that if the values were next to each-other, e.g. in cells A1,A2,A3 I would do =AVERAGEIF(A1:A3,">0")

Comments

Sign in or sign up to comment and upvote.

No comments yet.