ࡱ> ZY  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX\]^_`akcdefghij[lmnopqrtuvwxyz{|}~Root Entry F∬3>s@WorkbookC[_VBA_PROJECT_CUR"A)tjglgVBA tjg`kg  Worksheet"&Tools&WindowChart"&Tools&Window(Visual Basic Module"&Tools&Window\p Administratoreto Ba= ThisWorkbook=+<n@"1.Times New Roman1.Times New Roman1.Times New Roman1.Times New Roman1.Times New Roman1. Times New Roman1.8Times New Roman1.Times New Roman1Arial1$Arial1. Times New Roman1.Times New Roman1 Arial1.Times New Roman1. Times New Roman1.Times New Roman1. Times New Roman1.Times New Roman1. Times New Roman1. Times New Roman"$"#,##0_);\("$"#,##0\)!"$"#,##0_);[Red]\("$"#,##0\)""$"#,##0.00_);\("$"#,##0.00\)'""$"#,##0.00_);[Red]\("$"#,##0.00\)7*2_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_).))_(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@_)?,:_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)6+1_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)"C"#,##0_);\("C"#,##0\)!"C"#,##0_);[Red]\("C"#,##0\)""C"#,##0.00_);\("C"#,##0.00\)'""C"#,##0.00_);[Red]\("C"#,##0.00\)72_("C"* #,##0_);_("C"* \(#,##0\);_("C"* "-"_);_(@_)?:_("C"* #,##0.00_);_("C"* \(#,##0.00\);_("C"* "-"??_);_(@_)A<_("$"* #,##0.000_);_("$"* \(#,##0.000\);_("$"* "-"??_);_(@_)C>_("$"* #,##0.0000_);_("$"* \(#,##0.0000\);_("$"* "-"??_);_(@_)=8_("$"* #,##0.0_);_("$"* \(#,##0.0\);_("$"* "-"??_);_(@_)94_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"??_);_(@_)E@_("$"* #,##0.00000_);_("$"* \(#,##0.00000\);_("$"* "-"??_);_(@_) 0.000000000 0.00000000 0.0000000 0.000000 0.00000 0.0000 0.000 0.0%0.0 0.0000000000 0.000000000000.0000000000000.00000000000000.000000000000000.0000000000000000.00000000000000000.000000000000000000.0000000000000000000.00000000000000000000.00000000000000000000 0.0E+00 0.000E+00 0E+00 #,##0.0 #,##0.000 #,##0.0000 #,##0.00000 #,##0.000000 #,##0.0000000#,##0.00000000                + ) , *           " q!  a q q*0  *8 q(  a( q" " q q" q q ( q  q   q  q!  q       " q   *8  *8 " q  a    q , q  $@ @  ,@ @ q @ @ q (@ @ q (!@ @ q !@ @  $!@ @ q !!@ @ q(0  q (@ @  q ,!@ @ q (!!@ @ q ( q @  $@ q (@ @  ,!@ @  ,!@ @ q (!@ @  ,!!@ @ q (@ @  ,!@ @  ,!@ @ q (!@ @  ,!!@ @ q (  q (  q ( q (@ q (  @ q (  q (  q ( q (@@  q (  @  a (@  a (  q (@  q ( @ q"8"@@ q"8"@ q"8 " @ q"8"@ q"8 " @ q*8@ @ *0!@ @ q"8@@ q"8  @ q"8@@ q"8  @ q*8!@ @  Normal_AutoCorrNormal_MonteCarlo8 ``i̜̙3f3333f3ffff333ff333f33f33BBB\` %Doct: OneVarMCSimu} TwoVarMCSim MainModule`i H8 Sample NumbersecsAverageSDMaxMin?Only the first 100 repetitions are displayed on this worksheet.Summary Statistics!Results of Monte Carlo SimulationSimulation Stats repetitionsWThis add-in permits Monte Carlo simulation of one or two cells from any Excel workbook.Var1Var2fIt also allows the user to easily switch from RAND to random(FMRG), the Barreto/Howland implementationof Deng and Lin's FMRG.secondsNotesCorrected Mac LanguageID bug.#Used latest Howland Histogram code.Revised Histogram code--FHOBeginning value for Histogram display still need some work to make scaling nice,2Var Histogram is same scale both variables.mI dragged the Histogram module from MCSimRevised.xla.xls (that Howland was using for testing) into MCSim.xla.'Resized form for better display on Mac.UI'm still not able to get a nice display on a Mac without making it look bad on a PC. Frustrating.&Recovered file from Howland's machine.This should be it!*I'll never say "This should be it!" again.Added error checking code.=Added Howland's latest tweak on the binwidth and starting binvFollowed up on Howland suggestion to trap and report an error when the user selects a cell with a formula, but it does&not vary as the sheet is recalculated.6Added ability to track up to 256 cells and 65000 reps.CCorrected problem with sheet recalculation for tracking many cells.4Added option to output results to an existing sheet.1Based on a request from user Andrew Biggs at SSA.%Corrected Histogram updating mistake.3Added option to out results to MCRaw existing sheetCorrected Symbol font formatted cells, added updated (Oct-2004) RNGandSortModule from Random.xls, and added warning message in cell I1 on use of functions available only from the add-in.ZFixed problem with simply copying sheet with a chart from the add-in to the the user book.Learned that =random() looks first in the workbook, then add-ins. Because chart uses the name of the sheet in the Series formula, that somehow triggers "full naming."XThe only way to access the random() function in the add-in is to use MCSim.xla!random().With this version, the MCSim sheets in the add-in do NOT have charts. The chart is added AFTER the sheet is copied to the user's book.fAlso changed code to check for no change in a cell up front instead of waiting after the code has run.CFixed problem with wrong color coding of chart in a 2 var histogram>Fixed bug with non US English versions. Thanks to John Talyor.(Added recalculate entire workbook option8Fixed sheetname problem when user deleted an MCSim sheetOAdded Functions module from Random.xls to include functions with correlated Xs.Enabled fewer than 100 repsAdded a feature that uses the cell name, if it is named, instead of the address, in the Monte Carlo output using the Function CellName(Address as String) eFixed bug with recalculate entire workbook option. You cannot put a checkbox control inside a frame. |Put in latest version of RNGandSortModule and cleaned up Log10 function (putting it in the Histogram code where it belongs)."Foreign language uninstall support:6 U+n1" cc  R(148:  dMbP?_*+%;&A Page &PMF Canon iR5570 PCL6<h  odXLetterCanonY Canon iR5570/iR6570 PCL6ddd      d d d d dd@@d  d  d dd d"edd     ddd     d!!d      !"#$ddA     A d     @8o @*/ o @*/ AXXd2\SRGBCO~1.ICM\SRGBCO~1.ICM\SRGBCO~1.ICM CONFIDENTIALCONFIDENTIALHArialDefault Settings@"dXX??U} 7}  R;;;;;;; ; ; ; ; ;;;;;;;;;;;;;;;~ 7@ 7 7 7~ 7@@ 7 7~ 7@ 7 7 7 7~ 7@ 7 7 7~ 7@ 7 7~ 7@ 7 7 7~ 7`@ 7 7!8t!;";$;%;';(;);+;,;.;/;1;2;4;5;6;7;8;9;;;<;>;?;~ !7@ "7"~ $7@ %7#~ '7@ (7$ )7%~ +7@ ,7&~ .7@ /7'~ 17@ 27(~ 47@ 57) 67* 77+ 87, 97-~ ;7@ <7.~ >7@ ?7/2@;A;B;D;E;G;H;J;K;M;N;P;Q; @70 A71 B72~ D7@@ E73~ G7@ H74~ J7 @ K75~ M7 @ N76~ P7@ Q77>4@RRR7 Sheet1   gV<eWky|  dMbP?_*+%;MSymantec Fax Starter Edition@f@MSUDOLFAXDRVd"d??U} #}  } } } } -}  } }  @ }  }  } @} @ }  }  } !* } +1 } 2 Estimated rho in SUsgBBv BH! BJ BJ B;B;B;BJ B; B; B; B; B; B;B;B;B;B;B;B;B;B;B;B;B;B;B;B;B;B;B;B;  !#$%&*&2A  B f g"""""""("""""""""" ~ !" """#$""%>&"""""""""""""""""""""A~ #?$ (C > !!?~ "#$!?~ %&*&2A~ #@$ (D E a  bc  d  de &!!?~ "@#$!?~ %@&*&2A~ #@$ %8% G H|u? '[V\ &!1?~ "@#$!?~ %@&*&2A~ #@$ = ; 0n? F]^T !!?~ " @#$!?~ %@&*&2A~ #@$. < :>i@ '_UT !@)?~ "@#$1?~ %@&*&2A~ #@$. ? @lSQ? 9`YZ !1?~ ""@#$1?~ % @&*&2A~ #@$/%6%%%% !9?~ ""@#$!?~ % @&*&2A~ # @ $ / (6%%%%  & !!?~ "(@ # $!?~ %@ &*& 2A~ #"@ $ %6%%%%  & ! ?~ " @ # $@)?~ %@ &*& 2A~ #$@ $ %%%%%%  & !@)?~ "@ # $@)?~ %"@ &*& 2A~ #&@ $ %%%%%%  !`?~ "@ # $1?~ %"@ &*& 2A~ #(@ $ * %%%%%%  !1?~ "@ # $1?~ %"@ &*& 2A~ #*@$*%%%%%% !?~ "@#$9?~ %"@&*&2A~ #,@$*%%%%%% !9?~ "@#$9?~ %(@&*&2A~ #.@$%%%%%% !?~ "@#$!?~ %(@&*&2A~ #0@$%%%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!*&`2A~ a#X@a$a!*&a2A~ b#@X@b$b!*&b2A~ c#X@c$c!*&c2A~ d#X@d$d!*&d2A~ e#Y@e$e!*&e2A f,x``````P>@   7 Sheet2   g=~: `  dMbP?_*+%;"d??U} #} 0} 1} } }  } }  }  }  } @} @ } 5 } 6 Column LgBBv B! BJ BJ B;B;B;BJ B; B; B; B; B; B;B;B;B;B;B;B;B;B;B;B;B;B;B;B;B;B;B;B; !'6A  2 3 B f l"""""""j"""""""""""""""A~ #? 45 (C > !'6A~ #@ 45 (D A h  i  j  k  d e&!'6A~ #@ 45 %8% I JLo?  N Or?}k?  VW &!'6A~ #@ 45 I K ??  N Ph ?  SX !'6A~ #@ 45 I J*?  N OV?  UT !'6A~ #@ 45 L M{n  Q R ݿ  YZ !'6A~ #@ 45%6%%%% !'6A~ # @ 45  (6%%%%  & !' 6A~ #"@ 45 %6%%%%  & !' 6A~ #$@ 45 %%%%%%  & !' 6A~ #&@ 45 %%%%%%  !' 6A~ #(@ 45 * %%%%%%  !' 6A~ #*@ 45*%%%%%% !'6A~ #,@ 45*%%%%%% !'6A~ #.@ 45%%%%%% !'6A~ #0@ 45%%%%%% !'6A~ #1@ 45~ +?%%%%%% !'6A~ #2@ 45%%%%%% !'6A~ #3@ 45%%%%%% !'6A~ #4@ 45%%%%%% !'6A~ #5@ 45!'6A~ #6@ 45)!'6A~ #7@ 45!'6A~ #8@ 45!'6A~ #9@ 45!'6A~ #:@ 45!'6A~ #;@ 45!'6A~ #<@ 45!'6A~ #=@ 45!'6A~ #>@ 45!'6AD`ljrvvvlvvvllzlllV`VVVVVVV B;!B;"B;#B;$B;%B;&B;'B;(B;)B;*B;+B;,B;-B;.B;/B;0B;1B;2B;3B;4B;5B;6B;7B;8B;9B;:B;;B;<B;=B;>B;?B;~ #?@ 45 !' 6A~ !#@@ !45!!'!6A~ "#@@ "45"!'"6A~ ##A@ #45#!'#6A~ $#A@ $45$!'$6A~ %#B@ %45%!'%6A~ &#B@ &45&!'&6A~ '#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c6A~ d#X@ d45d6A~ e#Y@ e45e6A f,x>>>>>>P>@"    7 Sheet3 &A Page &P"P??d> P MainModulebY.__SRP_b __SRP_aThisWorkbook%  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^`abcdefhiklmnopqrstuvwxyz{|~ $  8 X 4` 8 ""6 &8C` x/3x  0 4 & "( 0HPX *`"2 K ;0 D@$R    ,S 2 H <nP Fs H  ( <0 p  x 2   >v       8 P X 0h  ` " J   DOCUMENTATIONE> This add-in does a Monte Carlo simulation of one or two cellsog from ANY Excel workbook INITIAL DATE: 5 Jan 2004 REVISIONS: 5 Mar 2004 8 Jan 2004 14 Jan 2004 20 Jan 2004 22 Feb 2005 24 June 2005- To see complete documentation, see Doc sheet User Input; It is assumed that the user has a workbook with some cells that use random number formulas Written by Humberto BarretoQ for Barreto/Howland, Introductory Econometrics, Cambridge University Press, 20067 Idea behind the Progress Bar is due to John Walkenbach3 http://support.microsoft.com in the Knowledge Base( FMRG references in the RNGandSortModule% All other ideas from Barreto/Howland Contact Humberto Barreto Dept of Economics Wabash College Crawfordsville, IN 47933 E -mail: barretoh@wabash.edu phone: (765) 361-6315 FAX: (765) 361-6277- Run the MCSim add-in by executing this macro2 It will bring up a form which enables the user to input necessary information+in case the user is in a graph or something load form with where the user is "!$ !( make sure it's A1 style &!( *This add-in will not work with columns as numbers. Please execute Tools: Options, click the General tab, and uncheck the R1C1 reference style option..Unacceptable Reference Style0 42A@,k B@6oh) ****************************************. This macro adds a menu item so the ShowMCForm macro can be run from the menu define variables]]'B$ Make sure the Tools menu is visibleWorksheet Menu Bar$D(Fcheck language] &!J$WThanks to John Talyor N &%LTools'H=it's not English, try to get the word for Tools from the userd@The language of this installation of Excel does not appear to be EnglishUS. Please enter the word that Excel is using for Tools on the main menu across the top of the screen. For example, in Spanish, it is Herramientas.Get the word for TOOLS Herramientas &%P'HkdTools'Hk HWorksheet Menu Bar$D%R(F+ Check t &$^HxME@ LZ6 <`<< L"LLLLLL`k66;`@x`Bv `HX X@%@x\ @T  j`Jq@D %(`pXx@4 @($ @ @ @0 @H @` @ @ @ @ @ #`%)@@ ^@X @p| @l @\ @L @< @d, @ 0H"&*4,@x @h @d @T @`D @@ @x0 @ @ @ @ , `l @\ @L @< @, @  @  @  @ (  @ @xx @h (d @` @P L @< @,  ( @ @ H  @ x  @  @bD!$*\Rffff*3I4462fc38*\R5*#50*\R1*#4a*\G{6D9D214E-BA6D-4A92-B9A3-7C5942959563}#1.0#0#..\Forms\RefEdit.exd#Ref Edit Control*#0$*\Rffff*1Y445b700f*\R1*#1c8*\R0*#14*\R0*#1*\R5*#30*\R5*#50*\R5*#4f*\R1*#6c*\R0*#f*\R1*#d7*\R5*#4e*\R5*#4d*\R5*#8c*\R1*#e8*\R1*#2ac*t  D `       0 4H  B &    X8 > : . ,@ p     o see if there is a MCSim menu item'B @ HWorksheet Menu Bar$D%R!R!T @ HWorksheet Menu Bar$D%R%R!V MCSim ...AMeans the MCSim menu item is already there, make MCSimIsHere True'Bd5Means the MCSim menu item is not there, so do nothingkX @+ Add the MCSim menu item if it is not there B]( ^l HWorksheet Menu Bar$D%R!R%\.X X ShowMCForm9` MCSim ...9Vqxkpoh* Message to the user when add-in is loaded MCSim ...ToolsWorksheet Menu Bar$D%R%R!`A@,o(AYou have successfully loaded the Monte Carlo Simulation add-in. You must have at least one cell that has a random number function in its formula. You provide one or two cells and the add-in simply recalculates the workbook for as many repetitions as you indicate and outputs the results in a new sheet in your workbook. $f $fExecute  H: MCSim ... to begin. h Monte Carlo Simulation Available$,'dAttribute VB_Name = "MainModule" ' DOCUMENTATION@This add-in doe MonCarlo simulation of one or two cellsfrom ANY Ex workbookINITIAL DATE: 5 Jan 2004REV$ISS: 5 (Mar8 )14 20 2 Feb:5$2uR 3Taee c omplejdo@cumenti, s Doc s0heet!User Inpu ' It ssd thate uhay with so ranBdnumb.for8Written byHto Barpreto /PHowl&,Qtrctory 0Econ@cs, Cambridge University PXresF6Idea behin6eog!=due !John Walke nbach#http://support.microsoft.Z @the Kn*e BaseA FMRG ref`erenc RtNG3S All o@r iy)s BDE@1C@acjQNDep&tGic¬Wabash Colleg&CrawaYdsviVN 47933"#E -mail:D bdh@w.Heduph: (765) 3@61-631ŸFAX277 C.RunMCSimby executing@\maW@w@' @vup a ,m which enabl*A/SE#GiX ne-s2aDina_ Sub ShowMCFR() @On Err`|Re^ Next '5c`8b `a graphA^tIgloafd$bwh=I  .RefEd@itOneC.ValN= Act`VBAddR make sure it's A@1 styl`7If Applicoba KS`xlR1C1 Th en Ms@gBox pp0t:=")+not˜ycolumn|s ws. 0 Ple!#5e Tools: OVp@lckBGeneral tab, \ uncheca o.", TitleUnalccX; `& Buttons:=vbC!l E@zIf&-<@>O * *"a$"QUu`1em BIcc be r ]"xGSCPub% P=`MenuItemaQ' defivari[ D ej Asp Lon`MI,sH"B`1ea`== Fal]AMFIb7 s visih 0Comm5@s(l"WB ").VC@LTruQ@ C;guamy# `SA@VLeft(VOFpD~Sys, 1) "W"$W'ThanksTalyor E_I{rnaq(al(xlNonEnglishF')) <> ! 81E Ђ'iq601, tC`ge#ppor>/#ZB&?7 v8("]9 5ZpDs@dstalӅd1 appe% US.9aR)B RxKusU`P a ^ns Ws@ltop# Gcre\en?R0Za,nSpan(ramiAsa<"GOOLS;", 2XTFD4  4:`]3p6D4%;D `"%p$ p Dc]@p5D CX RD (%'%'%'%'%: %:` % p$ p D`1Xp5D/ CXSlXF%\:`%p$ dp H\  ,  )p\pvnxlXF%\:`%p$ dp H\  , WDA4")p\6D4dsx@lXF%\:`%p$ dp H\  , DA4:]3)p\6D4vpvx xf kv0v%lXF%\:`%p$ dp H\  , W4$)p\64$ l    c D  $ '<'L:N\\@:`D4$:lXF|:l^i,6D4$|l\L<`4,XHTp\D4$|l\L<0   arU $ `$ `$ `nd ^^#<}~3Z L2{?Fc7BHhgʓxc7BHhgʓ}~3Z L2{?ME0[LSS6"<8<<<<< <$<(<, <<<N0{00020819-0000-0000-C000-000000000046}P n@`@|kT p`NX`H%@ %l0 %>(olo\Hvxt p @` @P @@ (0 , @(  @ @ @ @ @ @ @ @ @@\TbD!$*\Rffff*1V445b700f$*\Rffff*3I4462fc384" "0 8 " @ 8H    DX$` Dm  Put the MCSim menu item in does A@>ox@1 Delete the new menu command from the Tools menu.0check language] &!J$WThanks to John Talyor N &%L@Tools'H, =it's not English, try to get the word for Tools from the useruaged8The language of this installation of Excel does not appear to be EnglishUS. Please enter the word that Excel is using for Tools on the main menu across the top of the screen. For example, in Spanish, it is Herramientas.Get the word for TOOLS Herramientas &%P'Hkd MCSim ... HWorksheet Menu Bar &%D%R%RB@zoTools'Hk `@Attribute VB_Name = "ThisWorkbook" Bas0{00020P819-0C$0046} |GlobalSpacFalse dCreatablPredeclaIdTru BExposeTemplateDerivBustomizD2Sub _AddinInstall() ' Put the MCSim menu it em inqdd M I ` End ) " -Uni.Dele0new/ comma"from=Tools! . On Error ResuNext Xcheck languagQ D-yAs Sng If Left(Application .Oper@ngSys3, 1)AW" The;'Thanks to John Talyor@Internal(xlNonEnglishFuncAs) <> _DA5m)A<@'it's not , trygeewor8d fB8Lus:e&EB K*putBox("8L of]isxB2Excel doe$appe$arA#be(US. PleeAe )tha1Busing.onB mainC`acrosZtop$e screen. F"<<<< <$<(<,<0<4<8<<<@/,q  (P x   ,0J "ZR`J & "  >0 p!x! ,j      8 @ $`  -<2 0*f8   h  8Q &D  204[G (-&!!  (  8 P ` p  x .-0d 0 @P *X* ^ 28n@ x/,q (  (  0 "8"R` " " $Ph"G  22 282P h    $4 t d,,0+0z( X p ( 7  .4N&18 `2op2o8x8x2P0`2p !> * H27 8@H7Phpx; .v  < @ H` x-<2 *f *f8  h   8 Q &D!  20!4[G  (!-!&!!!!"  ("  8" P" `"p"  x" ."-"""0d# 0# @#P# *X#*#*# ^# 2($8n`$ $$/$,q$ (% 0%@%H%  P% "X%"R% "% "% %$Ph!"G%"G &  H& 2X&2p&2&2& 2&2&2&2' ' 8' X' x' ( (( (( )0z) **0*$48*`* h*x**$4** *,H,+,,H,*,+ (P+ 7x+ + +.+4N+&1, 0,2o@,2ox,8x,8x,2 -00-2@- !P->`- *x--- ------H-2-7-...7 .8.@.H.P.X.;`.. N. . <p/ / "/-/ /,O0 013@1111121 2D3244 . 4P4/X4 $h4Ox4 x535 6(60686/@6 $P63`666 6  7 @(7<h7<7H7 ,08 "E`8<8N88.9 "B(9P9/99 @:<@:<:<:H; ,H;"Ex;<;N;<. < "B@<h<</== N= "=2> "> B(>-p>>|C> ? . ?/P? $`?Op? p@3@A A(A0A/8A $HA3XAAA A BB0a0B `B pB "B "B2B "B/B BC &C8C @C`C &hC C/C&JC;C C1D &(D %PD `DD D D D "D 3J D "D D EE " E(E0E"V8E $`E`QpE EEE EEEfF hF"pFxFF"VF $F`QF G(G0G 8G@GHGfPG G Kx] ]X]p]]]]](]@]X]p]ete th]0]H]`]] ; These are the proposed Widths of the bins in the histogram]]]]](]H]h]]]]] !! $!!'Get user inputted data First cellmake sure it's a valid cellA@  Unload MCForm|k*Get exact location of the cell as a stringNThis string can be used in a Range Object with all usual Properties accessible !! $%$'User error check $!=  aThe selected cell does not contain a formula so the cell value will not change. Please try again.. 42 Fatal Error0A@, Unload MCForm|8k0 Second cell !! 'dmake sure it's a valid cellA@  Unload MCForm|k !!  %%$' $!=  hThe selected second cell does not contain a formula so the cell value will not change. Please try again.. 42 Fatal Error0A@, Unload MCForm|kxkpcheck to make sure cell changed]]]0  it's a OneVar $! ' $B@  $! The cell you selected, , did not change when the sheet was recalculated. This cell may not be appropriate for a Monte Carlo analysis. Do you want to proceed? Cell Doesn't Change Warning$,'   A@r|kkd it's a TwoVar $! ' $! ' $B@  $!   $! One of the cells you selected,  or  , did not change when the sheet was recalculated. That cell may not be appropriate for a Monte Carlo analysis. Do you want to proceed? Cell Doesn't Change Warning$,'   A@r|kkk ` Track the Time elapsed ' Get the calculation setting &!' Set to manual  &( Turn off screen updating &($ Change RAND for random if requested !RANDOMRAND   !B@kh$ Change RAND for random if requested !RANDMCSIM.XLA!RANDOM   B@k Show the Progress Bar !(F9 general variables not used in this histogram application'':handle user's request for more tracked cells, called MCRaw ! !  !.check for too many reps  You cannot have more than 65,535 repetitions when the Record All Selected Cells option is on because the results will not fit on the sheet. Please lower the Number of Repetitions below 65,535.. Too Many Reps0 42A@,|kdeclare array for results]h] Get number of var to be tracked  !  !  '    You have selected more than 256 cells to record. This cannot be accomodated on an Excel sheet. You may have inadvertently selected a large range of cells. Please correct this and try again..Too Many Cells to Record0 42A@, A@r|kadd a sheet for MCRaw B@\CI added 1 to Sheets.Count and used 2 instead of 1 to make the MCRaw1sheet number correspond to the MCSim sheet number8I added a loop to ensure the user would get a valid name]'  !TMCRaw !T   $!!name is taken can't use that name  '@k80name wasn't taken so use it]k0    get the sheetname for later use] !'7put down cell addresses in first row as labels for data'  !  ! %$  $%(   '   size array  kX  Run the Monte CarloDetermine if a One or Two Var  it's a OneVar   !! A@0this is actually faster if the workbook is smalldx $B@k` !!  $%!  + Track Progress  '2 Update the Caption property of the Frame control. 0%$ !(V Widen the Label control.  !!  !(, The DoEvents allows the UserForm to update.  d &!Z%"load array if user requested MCRaw ! ! 'initialize for next rep  !  !  ' !   +  k (put down results if user requested MCRaw ! !    @   @$  @ $%(  @ k@ #Get Summary stats and put them down     A@ WBasicFour(data() As Double, MEAN As Double, SD As Double, MAX As Double, MIN As Double)+Copy the MCSim sheet to the user's workbook & OneVarMCSim MCSim.xla$"%B@$name MCSim sheet'(  !TMCSim !T   $!!name is taken can't use that name  '(pkh`name wasn't taken so use itMCSim !T   (get current MCSim sheet name !'Put down first 100 $  $( x  +  +  +  +Make histogram**** Width histrange ^    $*'d    $8'khnHistogramMaker FirstCellArray, myReps, 31, xmean, 0, 0, 0, ActiveSheet, ActiveSheet.ChartObjects("EmpHist"), 1^(values, noobs, Nobins, center, manual, minval, maxval, histsheet, histogram, whichhistonsheet I4$( B2 B2$(   %P( %$.histsheet.Activate (,"make a chart on the existing sheet .B@\ 4 0(2 add a series :8  0B@6aa1:ab3 %> 0B@<C one seriesEmpHistChart 1 %@(size it $%D!EmpHist %B( $%H!FEmpHist %B(F $%H!J EmpHist %B(J $%D!EmpHist %B( 0!LB@H T N!P(R 0!VB@H NB@z Z 0%XB@H N!\ `9^ T9bq N T9d T9f T9hqx Z 0%X!jB@H 0!LB@H l 0%X9n9pq  Z 0%X9n9pq 09r Empirical5t!v(dq         Ax Label Output5This is the end of the One Var Monte Carlo simulationd(it's a Two Var (   !! A@0this is actually faster if the workbook is smalld $B@kh !!  $%!  + !!  $%!  + Track Progress  '2 Update the Caption property of the Frame control. 0%$ !(V Widen the Label control.  !!  !(, The DoEvents allows the UserForm to update.  d &!Z%"load array if user requested MCRaw ! ! 'initialize for next rep  !  !  ' !   +  k (put down results if user requested MCRaw ! !    @   @$  @ $%(  @ k#Get Summary stats and put them down     A@      A@ WBasicFour(data() As Double, MEAN As Double, SD As Double, MAX As Double, MIN As Double)+Copy the MCSim sheet to the user's workbook & TwoVarMCSim MCSim.xla$"%B@$name MCSim sheet'z  !TMCSim !T   $!!name is taken can't use that name  'z(k name wasn't taken so use itMCSim !T   (get current MCSim sheet name !'Put down first 100 $  $(  $  $(    +  +  +  +  +  +  +  +Dim myMin As DoubleDim myMax As DoubleDim myHistWidth As DoublemyMin = Application.WorksheetFunction.Min(Application.WorksheetFunction.Min(FirstCellArray), Application.WorksheetFunction.Min(SecondCellArray))myMax = Application.WorksheetFunction.Max(Application.WorksheetFunction.Max(FirstCellArray), Application.WorksheetFunction.Max(SecondCellArray))"myHistWidth = (myMax - myMin) / 10Make histogram[SuperimHistoMakerScaled FirstCellArray, SecondCellArray, myReps, 31, (xmean + x2mean) / 2, 0, 0, 0, ActiveSheet, ActiveSheet.ChartObjects("EmpHist"), "Var1", "Var2",' myMin, myMax, myHistWidth, 2 get width %P( %$. ^    $*'d     $8'k ^    $*'d    $8'k Label Output AL1$( I4 AM1$(  C2$( AL AL1$( ]`"make a chart on the existing sheet .B@\ 4 0(2 add a series :8  0B@6aa1:ac3 %> 0B@<C two seriesEmpHistChart 1 %@(size it $%D!EmpHist %B( $%H!FEmpHist %B(F $%H!J EmpHist %B(J $%D!EmpHist %B( 0!LB@H T N!P(R 0!VB@H NB@z Z 0%XB@H N!\ `9^ T9bq` N T9d T9f T9hq8 Z 0%X!jB@H 0!LB@H l 0%X9n9pq Z 0%X9n9pq 09r Empirical5t!v(dqx               A|(values1, values2, noobs, Nobins, Center, manual, minval, maxval, histsheet, histogram, myname1, myname2, histbegin, histend, histwidth, histno)5This is the end of the Two Var Monte Carlo simulationkHdo the existing sheet option !~! ]0Please enter the number of the existing MCSim sheet to which the results of this simulation will be written. Simulation results on the existing MCSim sheet will be overwritten and lost. Click Cancel if you are unsure.Existing Sheet Name Requested MCSim Number &%P' fYou have canceled writing output to an existing sheet. No changes to an existing sheet have been made. hNo Writing to Existing SheetA@, k ]HMCRaw 'MCSim 'I5 $%! AverageI6 $%! SDI7 $%! MaxI8 $%! MinThe Average, SD, Max, and Min results are written in cells J5:J8, with labels in cells I5:I8. Cells I5:I8 of the chosen existing sheet do not contain this information so this may not be an MCSim sheet. Thus, no changes to the existing sheet have been made. 40Existing Sheet May Not be MCSim Sheet CompatibleA@, k (check to make sure existing sheet exists $B@H  The sheet name you entered does not exist. Please enter the name of the existing sheet on which you want to overwrite the MCSim results with the results of this simulation.Existing Sheet Name Requested MCSimNumber &%P' fYou have canceled writing output to an existing sheet. No changes to an existing sheet have been made. hNo Writing to Existing SheetA@,kk' $B@H  SThe existing sheet cannot be found. No changes to an existing sheet have been made. hNo Writing to Existing SheetA@,k B@  it's a OneVarb3:b102 $%! b3:b102 $%( f3:f4 $%! f3:f4 $%( j5:j8 $%! j5:j8 $%(  AH1:AL10000 $%!  AH1:AL10000 $%( &update the histogram on existing sheetEmpHist $%BB@ 0%!'  $AL$2:$AL$ '?&the 10 characters in the search string  ,'     $'EmpHist $%BB@=SERIES( !!$AL$1, ! !$AK$2:$AK$ , ! !$AL$2:$AL$ ,1) 0%(K15 %B@Hdb3:c102 $%! b3:c102 $%( f3:f4 $%! f3:f4 $%( j5:j8 $%! j5:j8 $%( l5:l8 $%! l5:l8 $%(  AH1:AM10000 $%!  AH1:AM10000 $%( &update the histogram on existing sheetEmpHist $%BB@ 0%!'  $AL$2:$AL$ '?&the 10 characters in the search string  ,'     $'EmpHist $%BB@=SERIES( !!$AL$1, ! !$AK$2:$AK$ , ! !$AL$2:$AL$ ,1) 0%(=SERIES( !!$AM$1, ! !$AK$2:$AK$ , ! !$AM$2:$AM$ ,2) 0%(K15 %B@HkXHdelete new MCSim sheet since the user wanted output on an existing sheet &( $B@z &(<output to MCRaw sheet if user selected record selected cells ! ! ]`CDo you want to write the output to the existing MCRaw sheet called ? MCRaw Output Option$,' (check to make sure existing sheet exists $B@H  The sheet name you entered does not exist. Please enter the name of the existing sheet on which you want to overwrite the MCRaw results with the results of this simulation.Existing Sheet Name Requested MCRawNumber &%P' fYou have canceled writing output to an existing sheet. No changes to an existing sheet have been made. hNo Writing to Existing SheetA@,=k=k=' $B@H  SThe existing sheet cannot be found. No changes to an existing sheet have been made. hNo Writing to Existing SheetA@,=k= B@   @   @$  @ $%(  @ delete original MCRaw sheet &( $B@z &( $B@HMCRaw overwrite end to IFk;record selected cells end to IFk;existing sheet end to IFk; Find Time elapsed and report it 'K15 %B@H   Q$(  $( run link checker I1$(  Return the calculation setting  &(One last calculationA@Put away the form A@r Turn off screen updating &(o:x Put away the form A@ro99] !! $%$'  Your entry, !! 2 , is not a valid cell address. Please try again..A@,'| 9d9'|9k9 Your entry, !!  , has caused error,   . Please try again..A@,o88]P !! $%$'  Your entry, !! 2 , is not a valid cell address. Please try again..A@,'|7d7'|7k7 Your entry, !!  , has caused error,   . Please try again..A@,o@7  2 &!Z% GA@j  2 &!Z% GA@j6get names of cells !! $']x !! $'ts K4$( C2 B2$( HNumber of repetitions -- check]` !! '   $?The number of repetitions must be an integer greater than zero.A@,|hHk`H]x '  ?The number of repetitions must be an integer greater than zero.A@,|GkG All is well 'G%check to see if one more is availableo maMCRaw !T   (<2+1 to make the number match the MCSim sheet number is taIt was not possible to give the MCSim and MCRaw sheets the same number. You may want to rename these sheets to indicate that they were generated by the same Monte Carlo simulation. h2MCSim and MCRaw Name Report0A@,IOAttribute VB_Name = "MCF@orm" Bast0{3FEB2C26-D2F4-4B47-8C2F-E4E382253116}{F91FD8BB-659J803-AE0D-D372D2D@E048F} G lobalSpacoFalse CreatablPredec$laIdTru BExpose0TemplateDerivCustomizDOption 0licit Pub CellValidSngTest As Boolxean9= Sub CommandButton1_C"k()ADim iL ong Fixrst1 1 A@rray()DoISecondQGmyreps!PctdoneSinglDmysta0rtti@=Va0rianGA yourseng 9xmGA,, xSDmaxLinC@x22%L22mVi8ewT{mA0AllA@shistRangCC$@myendTBwB1G/, w2G ' The@ the proWidths ofbins @/ ogramjjilHjkkInteger#a!(C`MCRaw myOriginalSheet()UmyCurrentMCSim/RSLPosip myEnd 'Ge@t user`'p;@ndBk cwmake sure it's a vazh#C{Fr If=. : 'U@nload B aExit  If )= .(#.RefEditOne. ue).Pq`Gnt./bexact locNab&H as+@TI  can be%daMa Obje with allAual PUertie ccessi #A.Addr`( exterH:=!'U6error check-In 1(1," ).ula, "=", vbT `p`#) < 11MsgBox!mmpt:="p sel`CB$donot tana f 8 soqDueX wi`"h. P` ztry 4ag.s: =vbCrXcal, TitleF@Rl EaC?F!F'TQDTwog"""Hw``(By00a'1-1rq11av152 XAct|bE.&it:)&&p %&&he>O&FE&syr &&&&h&&ti&& &Q _ q'pmy_~=RqL PIgݰ[nBp7sjRnPm/SS"SaF to />cM"=duFIn09dr?--' Aဠis wj* Re7FirstAArray(1 To- Track@L`ime elapsedstartt= Now!Af' Gehe calculaA se ng ` your@%A pplic.C SA#anu0al T xlHM ' Turnf screen upd SU@1RAND for random ifquestGa @\q.Op!Buttonb='uVwActiveSheet.a.Ds.elac`h at:="OM; moLookAxlP., SearchhOrdZ_X :=xlByRows, MatchCase:=['œBFMRrG`%TrVMCSIM.XLA!&a a7ShowVPro~ss Bar 5Frame%.Visi{Ogeneral v@s not< u_` @lhist am aX ViewTa .`rLong G dle! r's BJMmore tn cx 9ilMCRalNC!1cKah"R"= #PWiYw.SelzeRo@`bt*oboyAs( > 65535OmpXYcan%have ᭸65,A ¦w4Recorc"J ok .donca0Bresult@i f`tsl Ple_ l|owd߀lb.e  .UTidtlf"T `y s=s:=vbCritKI)cB(decla}aUD Cv(>)ueSgwCouweek0Un)Pn# Each a Iny #.Ao 6C1aHGDi!my[=a+ 1#N C : ra30*> 256#Qq#b#~s)P #0r=#.!&~ccxomo^ Ex0 !)may "inadvert`Vly0j0`a 0_P`2.$*An@a:y again#ny S, #._$W$U1% add@ % "fs.Ad@z'I PP 1Ac% M2 Mlqrmak Hp4'3d'spo` Q5]0I oopensuMr woul(d g~aVlixd nPY1 `ap;I0=(continue3: 9-iiPs._B)a5p*"R" &  +8=(ii).N ,y' QKtnА1PKatt"?f7Gofy!;C_see on[!.vailm3"Mb wa"Σ soqQl it`(= 2M'+'&m1^O& #(' `^$Hb $Str`QerRrput dowy15\(sesрfQ rasCds8PHPr(_Y_Y r+[_Y[5R sP[ )\(1, )/C1@q (Zernal:=Qq i.\t Psiz`Al , ?k7q7' Run;e CarloDeڌmi(p(a OзTwo!袈S_True kk0 'initialize\ nextp @4 Each a In.AreaCa.A+ 1Q+@(i, kk;C)NA!C .a>iCpu@t down,s'den"YG2 B& wid`=9* 0+- 10 N Do Event]llows"UserU to uB! Yigd Appl@!#.W@Ps!vFunon.Max({| / 50G0\@xload aa[u requ e@]dgRaw 6 hg1cJgkk0 'init@ialize/ Lne  Each |In W.AreadDfC `a.MGA` + 1GaMC(i, k*kC _NC a aAnbi!' down sul3}o"c"i!j &CounaFD`s(@ , j| #jdi`@Get Summary xstaARA!m! Basic Four MxmeaSDxW)\G`242B2Rm!hx2b'(@a() As+Bu2hMEANSDAXI8!Copy6MCSe36kqg] 5!^s(".xla").$>"`PPBeqFe:=㎂@n'0_. LoopNumber#20 Gin`ue5: #"s.!e" :3 " &  +S").%HpEu' a}`n can't at {8us~<Gop~?e,Gq.%was tR sUse i5= a8 g 3curr\myCBGmGPutGfb0 A_ _in#10efBS(2 P2A33ς! DR}s5bfr@I6)VSD57axE8GiW2Q\PAEad{UpmyMinwBWax_y1W~fH3=xxo[)?~et*)M' / 2N/ * / o/ ) / =f * -)1.R0RSu0imorS`edg\R3`()P03$2, 0%80:tObject_Pa""^1"p2p_ AG  a2#, 2 BҠ_CݠtP>r(A0] 1 58 401_< 862l\w1p!-ASqrDCp#?1ב1?(10 * Log10@hen w2 = (x2m ax - 8in) / Sqr(myreps)Else(10 * Log10z|nd If 'Label Output Range("B2").ValuemyOneCellNamr""C "Two"I4EK ""AL1#LAM# 'make a chart on the existing sheeCs.AddActive .TypxlXYScatterLinesNoMarkerBs'add7s0erie $LoiCWhere:=xlEAsObject, [:=myCurrentMCSimS*SetSourceData :=C .maa1:ac3") 'two 'C Shapes(:"< W#"E(mpHM"D9size iNBC2E ).Lefts7).Columns(9GC CTopRow@ Hei gh-B10).!D * 13wi8dth""* 6) "..PlotArea.SelHcM.InUior,orIndexxlNonĉ- LegeTndT D tARx Gxl‡)jWigBorde&r#!o.W-xlHairljlStyloE@! Ck MajorTicktl8Min¥Positw= )' (K""Grid>s*$29P CategoryĻHasK Fa.akp+C=h-? ?d  #k TitBTr>uQbXbac@_s.TexayiricalDG Call @ogramM r2Var(FirstArray, SecondC, w1, w2, xminax2A, )P, hUZ, _#Ala ngpViewTable, 2 |(vzsAnoobsdo(binpCcerA` anualpinxrq"p#Ryn`m`qbeg AgHnoB "wT1@ isvP:ofy  MoH CarlhimulaA5щRdoz opIf MCForm0eckBoxf2 T║D4imEt" A"sian lmy= Appl "S("Pl8easT number F{ to whichresul,tss wi'be wrian. @ v܋over D alostC k0ncPif you are unsur@e.", "E RequestedNB, (_2GtMsg0 "Yphave caledoan . No [0@%op  "been mad vbInf!% }W0@GoTo fini0sh e(#Raw#W= "M"C" &m' _)PK )eI56<> "Aagep" OrS61SD"Gng\7Max\8[in"!Q["`; d pVD, },,pz0+U.in @-ls J5X:J8pWцls I5:I8.r ![s S8(h\osp#;P GnPot cJa@t3M% sI ֻXw_URerYUVw#qfWkZRtR۠RRpr@`xistingSheet = False Then MsgBox "You have canceled wri output to an e  s. No changes@been made.", vbInformation, "A6WibE_" GoTo finish End Ifrr0 -s(my#?).Sct@ If E9 {inot be foundqrr.Clear aSecondCell{""e 'it's a OneV Rj("b3:b102").`Value CurrentMCSim). \ f3:f4 j5:j8+ AH1:AL10Ap'update the hogram oԁ cChartObjects("EmpHA(Activ myqStr@we"@brie`sColl @p(1).FqulaASt Pos`!@= In(1 , w$AL$2:") + p10 'a@racters i nsYch s" @y myq,") Mid߀ -@  B.,rm,1"=SERIES`(" & ">.Name@"!*1,K"/K$A=& "Y6 Q1)$zK15L%E@JU,`co>uΙ?@冟  l5:lAfJ^$2IML@as3_"~eaLLx /.?5LdLrtLLtLoE "6L!MLLndLL SٯLngALgLKL[L)od?_OGL heL$LNLLtKRDL",L (2o pYM _ UxM"]M7/]`!q2Yp("7|Y$B:dnew =S si byuser waDDoiTruEMCRawD hif sd rrd PdlsMCp.etck1v!D im@4Over!e Aste$ge@my= ("Do yqQϳ ҂d cad s{5sPR3A+?2Yes,No@BO#OpO1+ 6 0 'ch make suremο  ӓw֖ = )"In 㙠("ֲ nq1er'doPá֢. P΀)"ofBc`*whi oresulp*withris0a"5 :Reques@2"bNumHber, 2 WR>~8]"]formation, "No Writing t@o ExisXSheet" GoTo finish End Ifrr = 0 Zs(my~Raw&).Select If E\9 Then MsgBox " evsv cannot be found. changesan 0have.en made.", vbIn>rr.Clear @For iiy1 myrepsX j MCVarC_}Cells(.+ 1, j).Value(%  5Next j iiM'dte original  Applic.DisplayAlertsFalsep)Name).DTruŀ#B 'C%overwe eIF@ rec ord s@cted cF @ # FiTiBm@lapsa@port iia: my =w>ctive B3.R("K1 5"G6n4, 6m…-startt@) * 8640̓ 3 Ŕ@,run link checkfeI1L @CC' Return thelcul~@T $ng sCa= yourseOne last9 e>`Put away an Unload$ M Tof@f scretupd -SUd`SJB/LoopNumberMCSim <>  A`:m> uBapĎprompt:="It was possibleag@>C _aEWbj`+s d n. You%y nt!ren0se#qPaq hahe ere gene4ra]b#) MonzCarlo sim$9But@tons:= TitleyBp]nSub!GPriv ` Comm` 2D_Ck()= u=CmJ B wStrTestF0irst!_ Ona€Resu s!8 D@;A A$s # = aM.RefE8ditUa ).Address(er:=AJ1004ёC`:"r try &A " , iCIa valic a`DPɠA again.`1 zid#g`t3+ⵗflbm_ l)h& h2cauSerrorc}(!Sub wS^nd1!e !p!ы!!Two!t!!QB/)!! !C~A !z!fT!!="  !!!:/!G$ a:D t(4]g6tw3'$'d:T Ntt:N 6td$0$ a` 1 /50$ a` 1/5 ll0/'T%ltF%$ aBt52lF%$  d)8okD]'T%ltF%$ a35D'$'d:Nttlt*#*F^i4/6td$]3V$ /'T%ltF%$ aBt5/'T%llF%$ aBt52lF%$  d)wokD]'T%ltF%$ a/tok]'%llF4%$ ad/$)6dX'$'d:Nttlt*#*#ll*#*F^i426td$]3V$ %$  ;:]/(T]Itd D$5D!+'$'d't:N 6td$ Btooi+'$'d't:N 6td$ "qdldp P. $   !li@% $   $!" $   !-$  "c]35U:#%:D$%%%ft%$ @ Wt%&'()*+5t-$  "c]35W:$%:D,%%%ft%$ X $  -pp-$  "c]35 '$ D a.5ld3'$'d:T/Ntt:0N 6td$!a81[X5T.H !a.[P5L.; k^p^ L.# T. k^ 3'$'d:T2Ntt:3N 6td$l$ 7 '4%'D%'T%'%$  ()pJ/$  0ld@ q4$  0lkJ#*F]?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~rU 0@ d!0/ I %%'%9''9( (!)y,,Q/a(!-I00!1Q3dy3^i44415(,(!5Y55 6A+9<!9<1@!=@@@A_<_Q6666A77a7!`I888!AQAAAAB!BaBBBBBCICqCCCCDYDD!EiEE FAFiFFFF G)GGYG!IN!MYOyOOOO P)PIP)H!Q`iPX9U9YZZZ[Y[[[[L \A\q\\\]AXqXXXPPq^9]Y^d9a ad9eeaff!91 Y  8 q `a<   @ q `D9