Forum Discussion
Special SUMIF function Not Working as Hoped
I'm trying to create a formula that will allow me to sum totals, based on another criteria in a table (so basically a SUMIF), but I only want to sum totals that are in the row or above the row, of the current cell.
I tried this:
=SUMIF([Username],[@Username],G$2:G2)
I'd hoped this would help, as with each row the end point of the range would change. But, when I use this function, it still sums the entire column G based on the criteria, not just from that range. A normal SUM function works the way it should, but SUMIF is summing the whole column.
8 Replies
- SergeiBaklanDiamond Contributor
For such table
it is
=SUMIF(INDEX([Username],1):[@Username],[@Username],[Value])
in Subtotal column
- kaseyanne5Copper Contributor
SergeiBaklan Is there a way to adjust the formula to sum all the rows above, but not include the current row?
- SergeiBaklanDiamond Contributor
Perhaps the simplest way is to deduct the current row value
=SUMIF(INDEX([Username],1):[@Username],[@Username],[Value])-[@Value]
- kaseyanne5Copper Contributor
SergeiBaklan Thank you so much!!