1

Help! new to calculated columns although getting the hang of it I have 6 columns which will contain a value, I what to average the total figure divided by the number of columns but I want to exclude columns containing 0 and I am struggling! a lot!

In Excel I can do this by;

=SUM(E6:E11)/SUMPRODUCT(N(E6:E11<>0),N(LEN(E6:E11)>0))

or

=AVERAGEIF(E6:E11,">0.1")

1 Answer 1

2

Because you have a fixed number of columns, this is a cinch.

=(Value1+Value2+Value3+Value4+Value5+Value6)/(IF(Value1=0, 0, 1) + IF(Value2=0, 0, 1) + IF(Value3=0, 0, 1) + IF(Value4=0, 0, 1) + IF(Value5=0, 0, 1) + IF(Value6=0, 0, 1))
6
  • Do I assume value is my column name?
    – Daniel
    Mar 28, 2013 at 15:26
  • Correct, substitute the value# fields with your columns Mar 28, 2013 at 15:29
  • It works!!! thank you very much I really appreciate it, do you know how long I have been trying to work this out!!!
    – Daniel
    Mar 28, 2013 at 15:42
  • 1
    Feel free to nominate as an answer. :) Mar 28, 2013 at 15:58
  • How do I do that?
    – Daniel
    Mar 28, 2013 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.