You are almost close to the solution, your solution ignores the % in row number 1. It has to first allocate basis the % in row number 1 and than whatever is left in column N that should get divided.
For ex:- when you go to my example in row number 11(ignore row 10). I have first allocated on the basis of % there in row 1, and than whatever is left ie 60 . i have manually entered 30 each (60 divided by 2 as there are 2 Yes), - infact this should come with a formula. I get circular reference error when I do that with a formula.
I have one other idea as well, instead of applying formula in col N to get the difference and than dividing equally(which gives circular ref error). We can rather keep adding amount using row number 1 percentage wherever It's No, and than divide that amount equally amoung the people wherever it's Yes. Thumb rule is to first consider the % in row 1 and than add.