I have this data where column D has costs of Stock Tickers, and need to sum for each date till the next blank cell, like wise for each date.
I am using SUMIF or SUMIFS Function but its not working. Manually summing up is quite impossible as there are 1000 rows.
Is there any function / formula that will allow sum up the same. Any help will be greatly appreciated.
CodePudding user response:
In B1, formula copied down :
=IF(A1<>"",SUM(D1:D$13)-SUM(B2:B$13),"")
CodePudding user response:
You may try using a formula as shown in image below, assuming your data starts at cell A1, therefore the formula in cell B1
=SUMPRODUCT((LOOKUP(ROW($A$1:$A$13),ROW($A$1:$A$13)/($A$1:$A$13<>""),$A$1:$A$13)=$A1)*($D$1:$D$13))
Also there is an alternative formula which you can apply in cell B1
=IF(A1<>"",SUMPRODUCT((MATCH(ROW(A$1:A$13),ROW(A$1:A$13)/(A$1:A$13<>""))=ROWS(A$1:A1))*(D$1:D$13)),"")



