# Add cells, div by cells with value (Excel2007

Solved/Closed
Gouws Posts 45 Registration date Sunday February 7, 2010 Status Member Last seen April 15, 2012 - Feb 16, 2010 at 12:25 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Feb 16, 2010 at 03:33 AM
Hello,can any help!(excel 2007)
A B C D
Row1
Row2
Row3=IF(A1+A2=0,0,A1/(A1+A2) =IF(B1+B2=0,0,B1/(B1+B2) =IF(C1+C2=0,0,C1/(C1+C2)

Formulas in row 3 A,B,C but in D i want to ADDthe values from row 3A,B,C and divide by cells in row 3 that have got a value.If say A3=0,B3=30,C3=75 then in D3 it should ADD B3 & C3 and divide by 2, same when all 3 have values > than 0 it must divide by 3.

TX
G
Related:

## 1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Feb 16, 2010 at 03:33 AM
try this

=IF(AND(A3<=0,B3<=0, C3<=0),0,(a3+b3+c3)/IF(AND(A3>0,B3>0,C3>0),3,IF(OR(AND(A3>0,B3>0),AND(A3>0,C3>0),AND(B3>0,C3>0)),2,1)))