Hi people,
here my problem. I am not able to code in vba this simple problem
i have a function let say
F=A+K_1*B+K_2*C where A B C are given
I want to maximaize the function.
Because K_1 goes to take negative values if I think a step of 0,01 for bot K_1 and K_2
the loop shoul looks like
F=0
for step1=0 to 100
for step2=0 to 100
Fnew=A+(k_1-step1/100)*B+(K_2+step2/100C)+F
if Fnew<F  then exit for
else next step2
if Fnew<F then exit for
there is something that not convince with the two for loop.
I am new in VBA, sorry
there is somebody very kind that will be able to code it
thank you vermuch

xxuncina



F with K_1=K_1-0,01
and