Forum Discussion

Eira's avatar
Eira
Copper Contributor
May 19, 2025
Solved

Excel formula - Remaining Qty

Hiii.. I want to create a formula to get the remaining quantity to be produced considering the Code and Order No in columns A & B.  Can anyone help me with this? Sample data as follows: Thanks in a...
  • OliverScheurich's avatar
    May 19, 2025
    =IF(C2-SUMIFS($D$2:D2,$A$2:A2,A2,$B$2:B2,B2)>=0,C2-SUMIFS($D$2:D2,$A$2:A2,A2,$B$2:B2,B2),0)

    This formula returns the intended result in my sheet. It also ensures that the remaining quantity can't become less than zero.

Resources