SUMIF formula confusion // help?

I am reaching out as I am getting a little confused with a SUMIF problem. I've included a screenshot below to help illustrate.

So, the blue parent rows represent delivery phases and the device list at the top is the total contracted device count we get from a client.

The goal is that when a person enters a shipping quantity in the delivery phases below, the top total count adjusts accordingly and is represented in the "Remaining Quantity" column.

Using "Device SKU" as the unique identifier and subtracting from the "Quantity" column, I know this is possible... but just can't seem to make it work.

If anyone has any advice it would be greatly appreciated!


Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!