Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Creating Excel simulation in VBA

Not sure you want to get into this - the general form could look like:

Dim darrMySimulationData() As Double
Dim i As Long, j As Long

ReDim darrMySimulationData(1 To 1000, 1 To 60)

j = 1
For i = LBound(darrMySimulationData) To UBound(darrMySimulationData)
darrMySimulationData(i, j) = 1 ' Your func here
Next i

For j = LBound(darrMySimulationData, 2) + 1 To UBound(darrMySimulationData, 2)
For i = LBound(darrMySimulationData) To UBound(darrMySimulationData)
darrMySimulationData(i, j) = darrMySimulationData(i, 1) ' Your
func here
Next i
Next j


However, as far as I know you cant use the rand function in VBA (but there
are several VBA implementations if you google for them).

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel simulation formula larry Excel Worksheet Functions 1 October 1st 08 05:06 PM
How to use Monte Carlo Simulation in Excel? Suparna Excel Discussion (Misc queries) 6 June 2nd 08 11:20 AM
HOw to use Monte cARLO sIMULATION IN eXCEL? Suparna Excel Discussion (Misc queries) 1 June 1st 08 05:29 PM
Simulation in operations research using Excel denise1082 via OfficeKB.com Excel Worksheet Functions 3 July 31st 06 10:46 AM
can excel do Monte Carlo simulation? Prads Excel Discussion (Misc queries) 2 May 19th 05 08:28 PM


All times are GMT +1. The time now is 10:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"