Current location - Health Preservation Learning Network - Slimming men and women - TstABC fitness
TstABC fitness
This problem can only be exhausted by VBA, but because of too many data combinations, the code will run for a long time, but as long as you wait patiently, you will get the result (if there is a solution)

Child tst ()

Represent a, b, c, d, e and f as integers.

For a=20 1 to 352

For b=20 1 to 352.

For c=20 1 to 445.

For d=20 1 to 445.

For e=200 to 475

For f=200 to 475

If cell (1 2)* a/ 100+ cell (2,2) * b/100+cell (3,2) * c/100+cell (4,2) *.

Cell (1, 4)=a

Cell (2,4) = b

Cell (3,4) = c

Cell (4,4) = d

Cell (5,4) = e

Cell (6,4) = f

If ... it will be over.

then

then

then

then

then

then

end