'cells updating according to each other values

So the idea is to have a set sum value for 2 or more cells and if we change one of the cells value, it distripute the changed value on the other connected cells.

Let's say we have 2 Clients paying for the same Item:

Client 1 payed the full $100
enter image description here

Then Client 2 payed $30 to us, which then we pay client 1 back
enter image description here

Then Client 2 Personally payed Client 1 $20
enter image description here

so the question is:
Can I have 2 or more cells updating their values according to each other.

Edit1:
I didn't say what are the changing variables are.
Clients: there can be more than 2
Item: unchanging
Price: chainging



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source