View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Suz84 Suz84 is offline
external usenet poster
 
Posts: 1
Default Help With Vba Code


Dear All,

I am new to VBA and am stuck on trying to find the mean of a range of
values outputted by the following code:

' Create storage for FTSE100 and binary payoff simulations.
ReDim IndexSim(1 To SampleSz) As Double
ReDim Payoff(1 To SampleSz) As Double

'Do the simulations.
For Cnt = 1 To SampleSz
IndexSim(Cnt) = gBmProcess(Kt, r, q, Vol, TMat - TNow)

If IndexSim(Cnt) = IndexBetValue Then
Payoff(Cnt) = Range("D18").Value
Else
Payoff(Cnt) = Range("D19").Value
End If



Next Cnt

The first and last parts of the code have been omitted, but please
could somebody help me to attempt to find the mean of the IndexSim and
Payoff values outputted by the function.

Many thanks,

Suz


--
Suz84
------------------------------------------------------------------------
Suz84's Profile: http://www.excelforum.com/member.php...o&userid=36189
View this thread: http://www.excelforum.com/showthread...hreadid=559616