Auto-translated
If you sacrifice 3 units with 50 HP each, the Excel calculation results in 4 demons (which is incorrect). The statistics show that the number of demons ending in 3 or 9 decreases.
=IF(AND(hp>0, B3>0), MIN(F1, IF(hp<=35, ROUNDDOWN(hp*B3/35, 1), B3)), 0) – this is how you can calculate the number of demons.
Why use a second sheet? Everything can be calculated, for example, like this, to calculate the number of sacrifices per potion:
=IF(AND(B1>0, B2>0), IF(hp<=35, ROUNDUP(F1*35/B2, 1), F1), 0).
Calculating the number of excess/sufficient sacrifices is also very difficult.
P.S.: If one of the values in the inner IF statement matches one of the values in the outer IF statement, use AND(; ) to simplify the structure.