Hi @LTomas ,
I made a sample for you:
Create a table in Excel.

In PowerApps, ‘Data Table’ to connect to Excel table for view data, ‘Text input’ to enter numbers, ‘Button’ to submit data and set as follows.
ClearCollect(TestA,ForAll(Test,If(Sum(FirstN(Test,Value(ThisRecord.ID)),Qty)<Value(TextInput1.Text),{ID:ID,Title:Title,Qty:0})));
UpdateIf(Test,ID=LookUp(Test,!(ID exactin TestA.ID)).ID,{Qty:Sum(FirstN(Test,Value(ThisRecord.ID)),Qty)-Value(TextInput1.Text)});
UpdateIf(Test,ID exactin TestA.ID,{Qty:0})

Enter the number and submit, the data is updated.

Best Regards,
Wearsky