Haven’t been able to convert the next formula (H:H)-sumif(A:A,A:A,L:L)
(the original formula is has ArrayFormula and Ifs statements to make it work for every new row, but it’s not important for the found problem)

This is part of a bank statement balance where 1 transaction could be for 1 or many expenses. If not enough expenses are entered or extra expenses are entered, then there’s a remaining balance.

Just pasted the same table and I’m working on it. Feel free to point new ways of doing it.

I have gone this far after several error attemps:
if(count(thisRow.[#])=1,thisRow.[MONTO ORIGINAL]- thisRow.MONTO,thisRow.[MONTO ORIGINAL]- sum(thisRow.MONTO))