looks good, but you forgot to cover the case that if A1 is changed and all the sum places that refer to the A1 should automatically be changed as well.
furthermore, a complicated exmaple is that if B1 = sum(A1) and C2= sum(B1), then if A1 is changed, we have to make sure B1 and C2 are all updated automatically.
A dirty solution is put the all the sums into a list, then in the set() function, always call all of the sums in the list. However, there is issue of the calling order. in the above example, we have to make sure to call B1=sum(A1) before calling the C2=sum(B1).
to make sure the order, we have to maintain a tree, such as C2->B1->A1