Forum Discussion
Eira
May 19, 2025Copper Contributor
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 advance.
=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.
2 Replies
Sort By
- OliverScheurichGold Contributor
=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.
- EiraCopper Contributor
Thank you for your help.. This formula has helped solve my problem..