I have a table where I want to track the total quantity of items entered by group. Additionally I need to calculate the total by multiplying the item quantity by the rate. Once the group quantity reaches the maximum allowed no more totals will added. I am using the formula:

=[@Max]-SUMIFS([@Qty],[Group],[@Group],[Tally],"<[@Tally]")

Tally = The running count of the items per group.

I am getting at #VALUE! error, but don't know why.

Any suggestions??

Running Count.xlsx