Forum Discussion
kaseyanne5
Apr 25, 2019Copper Contributor
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 th...
SergeiBaklan
Apr 26, 2019Diamond Contributor
kaseyanne5 , perhaps that could be like this
if ST is subtotal calculate as in first formula,
@AM is current purchase (amount in current row)
X is the sum for which you give extra ticket (n*X = n tickets)
when
=ST - @AM*( INT(ST/X) - INT((ST-@AM)/X) )
kaseyanne5
Apr 26, 2019Copper Contributor
Thanks, but it doesn't seem to being doing what I'm looking for. It's just, kinda, taking X out of the total for some of the cells. I'm going to go see if I need to maybe change up my format and revisit which types of formulas I should be using.
- SergeiBaklanApr 27, 2019Diamond Contributor
kaseyanne5 , it substructs not X but amount multiplied on how many X we have in total. That's how I understood your logic
Do you know of a way to subtract the amount from the last row where the criteria was found?
If subsruct only one current amount if over another X, when maybe
=ST - @AM*( (INT(ST/X) - INT((ST-@AM)/X))>0 )