E Ka
E Ka

Reputation: 1

Average of two columns sum in excel

I have two columns, for example: A(10,15,30) and B(2,3,No data)

And I need average: sum(a)/sum(B) but without sum any cell in A column if cell in the same row of B column is empty. I need a formula for this... Based on this example, I'm looking for a formula which will give me average 5((10+15)/(2+3)), not 11((10+15+30)/(2+3)).

Upvotes: 0

Views: 2035

Answers (1)

Scott Craner
Scott Craner

Reputation: 152505

Use this:

=SUMIF(B:B,"<>",A:A)/SUM(B:B)

enter image description here

Upvotes: 1

Related Questions