Column additions query

M

My View

I have 2 columns of numbers.

There are no 'zeros' in Col 1 - all are greater than zero.

Some of the numbers in Col 2 are zero but most are greater than zero.

I want to be able to add all the numbers in column #2 that are greater than
zero and then divide that number by all the numbers in Column #1 that
coincide only with those numbers in Col 2 that are greater than zero.

In other words I do not want to include any numbers in the Col 1 addition
that are on the same row as the 'zeros' in Col 2.

regards

PeterH
 
D

Damon Longworth

You could use two SumIf's. Something similar to:

=SUMIF(I8:I12,">0",I8:I12)/SUMIF(I8:I12,">0",H8:H12)
 
M

Myrna Larson

Assuming there are no negatives in either column,

=SUM(B1:B100)/SUMIF(B1:B100,">0",A1:A100)
 
Top