Jonty
Jonty

Reputation: 27

IF Statement in Google Sheets

I am having some issues with the below formula. I want cells L6 and L7 multiplying in M6:M7 if both L6 and L7 are populated, which seems to have worked.

However, if both cells aren't populated like seen in the image, I need cells M6:M7 to be blank rather than 0, as the 0 is affecting the overall average off column M.

See Image Below

Upvotes: 0

Views: 49

Answers (2)

player0
player0

Reputation: 1

this is how you should do it:

=IF(COUNTA(L6:L7)=2, IF(L6:L7>0, L6*L7, ), )

Upvotes: 0

Solar Mike
Solar Mike

Reputation: 8365

I would look at changing the average calculation as blank can be taken a zero for some calculations.

In excel I would look at averageifs() and excluding zero values such as :

=averageifs(A1:A10,A1:A10,">"&0)

See enter image description here

Upvotes: 1

Related Questions