View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
millsy
 
Posts: n/a
Default UDF's using other UDF's


I know that the first calculation is correct by changing the code so
that I can see its result. One of the inputs I am using is:

Ws = 2300, We=700,Rs=2330, Re=900

If I place a ' in front of all the if statements in the Findcase
function to disable them and change Findcase=0 to Findcase=WsRs I get
the answer 0.5 which I would expect. If I then change Findcase=WsRs to
Findcase=RsWe I get 16.8333 instead of 7.5. If I then put a ' in front
of the line WsRs=Timediff(Ws,Rs) I get the correct answer of 7.5 for
RsWe. The first function call seems to mess up the second and
subsequent ones.

If I use the Timediff function in the spreadsheet I get the correct
answer for RsWe so it is capable of producing the correct answer.

As to the expected output, I would expect Findcase to produce a value
of 1 using the above inputs.


--
millsy
------------------------------------------------------------------------
millsy's Profile: http://www.excelforum.com/member.php...fo&userid=5122
View this thread: http://www.excelforum.com/showthread...hreadid=494261