Adding excluding zero

  • Thread starter Thread starter Jeremy via OfficeKB.com
  • Start date Start date
J

Jeremy via OfficeKB.com

O.k. This may not make a whole lot of sense, but I am going to give it a shot.


I need a formula that will add two cells, but return a value of zero, if
either of the two cells themselves equal zero.

Here is the reason.

I have a queationnaire and a follow-up questionnaire with 7 questions and I
am trying to find the average difference for each question answered by each
individual and then find the total average difference , but I need to
exclude any questions that an individual did not answer the question on both
questionnaires because a value of zero on one questionnaires scews the
results.

Is this even possible? Or if anyone knows an easier way to do this it would
be appreciated.
 
Let's say the 2 values are in cells A1 & A2. Use the array formula

=And(A1:A2<>0)*(A1+A2)

Array formulas are entered by pressing Ctrl-Shift-enter, instead of Enter
alone
 
Try this:

=AND(A1>0,A2>0)*A1+A2
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


O.k. This may not make a whole lot of sense, but I am going to give it a
shot.


I need a formula that will add two cells, but return a value of zero, if
either of the two cells themselves equal zero.

Here is the reason.

I have a queationnaire and a follow-up questionnaire with 7 questions and I
am trying to find the average difference for each question answered by each
individual and then find the total average difference , but I need to
exclude any questions that an individual did not answer the question on both
questionnaires because a value of zero on one questionnaires scews the
results.

Is this even possible? Or if anyone knows an easier way to do this it would
be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top