Hello,
I am trying to use the excel solver for an optimization that requires a long time for the goal function to be calculated.
For that, I need to use a UDF function.
Specifically:
In C3 I have =fun(c1,c2) and fun takes like an hour to calculate.
Not sure how I am supposed to deal with this. The C3 seems to be inactive but the script calculating the goal function is not doing anything.
I tried an exercise with an UDF function similar to the one below:
In Cell D2 I have =test(B2,B2) B2=4 and C2=5, so I was expecting to wait 10 sec and get in C3 the number 9.
What I get is an error : #Name
Any ideas?
Thank you
I am trying to use the excel solver for an optimization that requires a long time for the goal function to be calculated.
For that, I need to use a UDF function.
Specifically:
In C3 I have =fun(c1,c2) and fun takes like an hour to calculate.
Not sure how I am supposed to deal with this. The C3 seems to be inactive but the script calculating the goal function is not doing anything.
I tried an exercise with an UDF function similar to the one below:
Code:
Function Test(x,y)
If Application.Wait(Now + TimeValue("00:00:10")) = True Then
aa=90
else
Test=x+y
End If
In Cell D2 I have =test(B2,B2) B2=4 and C2=5, so I was expecting to wait 10 sec and get in C3 the number 9.
What I get is an error : #Name
Any ideas?
Thank you