Hi guys I need help to allocate the table seating accurately.

Lets say I have a name list and number of people will be attending and table allocate to them as follows:

Name Pax Table No
Amber 2 2
Bobby 5 1
Chris 1 2
Derrick 3 3



If I wanna look up for table 2, what formula can be used even if I change the number of people and table number? For example, now I know table 2 has 3 pax, if I change Chris from 1 to 2 pax, how would the table 2 can be affected and change to 4 pax?