Reputation: 30252
I have the following sheet (link). What formula would yield the itemized sums in B2, C2, and D2?
To calculate the value in B2, the formula should check cells B5:B10 and sum the corresponding values from A5:A10 for non-blank cells. Hence: 30+45+30=105
.
I have tried ARRAYFORMULA(IF(B5:B10 != ""), sum(A5:A10))
which results in Formula parse error.
Upvotes: 0
Views: 89
Reputation: 734
Considering that the numbers in column B are not to used (thats what i figured out from your example). you can use sumIf:
=SUMIF(B5:B10,">0",A5:A10)
so this will check if the cell in column B is greater than 0, then it will add its corresponding value from column A.
please note that if you put a character in the B column the SUMIF will not consider it because we are using ">0" as criterion, instead use ISBLANK.
hope it helps.
Upvotes: 1