ࡱ>  ;fzyu:  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdeghijklmnopqrstuvwxyz{|}~Root Entry Fe= c:<yWorkbookjj_VBA_PROJECT_CUR"h`|:c:VBA |:Y4: \p IT Services Ba=; ThisWorkbook=Ky<X@"1Arial1Arial1Arial1Arial1 Arial1Arial1Arial1 Arial1 Arial1 Arial1Arial1Arial1$Arial1 Arial1h8:Cambria1,8:Calibri18:Calibri18:Calibri1:Calibri1:Calibri1<:Calibri1>:Calibri1?:Calibri14:Calibri14:Calibri1 :Calibri1 :Calibri1:Arial1:Calibri1:Calibri1 :Calibri1:Calibri1:Arial1:Arial1:Arial1:Arial"$"#,##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\);_(* "-"??_);_(@_) 0.0000"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"* "-"??_);_(@_) 0.00000000 0.0000000 0.000000 0.00000 0.0000.0 0.0%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.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"Yes";"Yes";"No""True";"True";"False""On";"On";"Off" 0.000% 0.0000% 0.00000% 0.000000% 0.0000000% 0.00000000% 0.000000000%0.],[$ -2]\ #,##0.00_);[Red]\([$ -2]\ #,##0.00\)                                                                      ff + ) , *      P  P         `            a>   @ ( (  ( ( ( (P (X (    D (  ( "P         ` "p      ||Uq}-}= 00_)}A}2 00_)[$ -}A}3 00_)?[$ -}A}4 00_)23[$ -}-}5 00_)}A}1 a00_)[$ -}A}( 00_)[$ -}A}9 e00_)[$ -}}7 ??v00_)̙[$ -##0.  }}; ???00_)[$ -???##0.??? ??? ???}}) }00_)[$ -##0.  }A}8 }00_)[$ -}}* 00_)[$ -???##0.??? ??? ???}-}? 00_)}x}:00_)[$???## ??? ???}-}/ 00_)}U}> 00_)[$## }A}" 00_)[$}A} 00_)ef[$}A} 00_)L[$}A} 00_)23[$}A}# 00_)[$}A} 00_)ef[$}A} 00_)L[$}A} 00_)23[$}A}$ 00_)[$}A} 00_)ef[$}A} 00_)L[$}A} 00_)23[$}A}% 00_)[$}A} 00_)ef[$}A} 00_)L[$}A} 00_)23[$}A}& 00_)[$}A} 00_)ef[$}A} 00_)L[$}A}  00_)23[$}A}' 00_) [$}A} 00_)ef [$}A} 00_)L [$}A}! 00_)23 [$ 20% - Accent1M 20% - Accent1 ef % 20% - Accent2M" 20% - Accent2 ef % 20% - Accent3M& 20% - Accent3 ef % 20% - Accent4M* 20% - Accent4 ef % 20% - Accent5M. 20% - Accent5 ef % 20% - Accent6M2 20% - Accent6  ef % 40% - Accent1M 40% - Accent1 L % 40% - Accent2M# 40% - Accent2 L湸 % 40% - Accent3M' 40% - Accent3 L % 40% - Accent4M+ 40% - Accent4 L % 40% - Accent5M/ 40% - Accent5 L % 40% - Accent6M3 40% - Accent6  Lմ % 60% - Accent1M 60% - Accent1 23 % 60% - Accent2M$ 60% - Accent2 23ٗ % 60% - Accent3M( 60% - Accent3 23֚ % 60% - Accent4M, 60% - Accent4 23 % 60% - Accent5M0 60% - Accent5 23 %! 60% - Accent6M4 60% - Accent6  23 % "Accent1AAccent1 O % #Accent2A!Accent2 PM % $Accent3A%Accent3 Y % %Accent4A)Accent4 d % &Accent5A-Accent5 K % 'Accent6A1Accent6  F %(Bad9Bad  %) Calculation Calculation  }% * Check Cell Check Cell  %????????? ???+ Comma,( Comma [0]-&Currency.. Currency [0]/Explanatory TextG5Explanatory Text %0 : Followed Hyperlink 1Good;Good  a%2 Heading 1G Heading 1 I}%O3 Heading 2G Heading 2 I}%?4 Heading 3G Heading 3 I}%235 Heading 49 Heading 4 I}%6( Hyperlink 7InputuInput ̙ ??v% 8 Linked CellK Linked Cell }% 9NeutralANeutral  e%"Normal :Noteb Note   ;OutputwOutput  ???%????????? ???<$Percent =Title1Title I}% >TotalMTotal %OO? Warning Text? Warning Text %XTableStyleMedium9PivotStyleLight16`_{ Documentation Notes Data ShowHistogramForm    + 3  @@   bSuffix trapping in sheet: ' Need to count how many there are, identify which ones have numbers at end, and then find out what max value isDone on 1-Oct VStarted on checking for integers; got number of unique values both for first variable.HistogramMaker uses a density scale. For example, if the variable is measured in pounds, the vertical axis will be measured in percent per pound.This means that in superimposed histograms, even when there are many more observations of the first variable, the histograms will have the same area.Need to check for variable names which make the sheetstring for the title illegal. For now it may be best to name the Histogram sheets Histogram1, Histogram2, etc. YI've started this, but am still working on finding the names of all the histogram sheets. See below.*This is probably an artifact of fuzziness.ESee MeanReversion to find public variables to hang on to Range items.]I think this is done. Solution found by Barreto is probably better: just hide the user form.FIf all integers then make precision on everything but mean, SD just 0. Documentation for HistogramAddInAuthor: Frank HowlandAMany thanks to Humberto Barreto for Visual Basic code and advice.XThe histogram maker will draw single-variable or two-variable (superimposed) histograms._The histogram is set up so that class boundaries are rounded, e.g. if the minimum value is 602 Zand the maximum is 718, class intervals will probably start at 600 and end at 720 or 725. Density Scale"Class Intervals and Number of BinsDAdditional thanks to David Maharry for help with sorting routines. :All Rights Reserved by Frank Howland and Humberto Barreto. Notes sheet@Contains ideas for improvements and notes on progress of add-in. Data sheetContains test data.AB Number Vars Number ObsAvgSDMinMaxNotes&Need to add Avg, SD computation module'Need to work on naming sheet convention2) Number of variables63) Check to see if anything has been put in Var1refedt6) Are we dealing with a block?Logic of the Histogram RoutineTo do:7Col) Test if numcols > numvars(7) Doesn't apply to block organized dataSteps@Order of data in range is tricky when data is organized in rows.%4) Get number of X variables, NumXVar5) Is there a label?7Row) Test if NumRows > numvars8) Check for non-numeric data!9) Get the data out of the range.<Need to change the cursor shape when it's on the data table.Add Histogram2Var routineCheck for blanks in range."Check for missing values in range.See Regression Add-InPrivate Sub InputOKbtn_Click()!Two variable case not yet handledE10) Check to see if new ply is called for *** not yet implemented ***#Currently, only new ply is allowed.Can be either 1 or 2.$Need to add code on naming new sheetBIf range on current sheet is called for, need to enable refedt boxDo we need to lay down values?.I think not. We can store data in main module9Currently, data is being transposed in two variable case.Problems#It's there, but not yet implementedComments)Put in a "view the original data option". Worksheets1Data sheet contains example, button to start dataFTwoVarCase shows that data is being transposed. Need to look at code. FAfter Input button is clicked on first ply in HistogramGenerator . . .ANothing done with this distinction yet. Need discrete histogram.!1) Continuous vs. discrete values^This is done via the routine storevalues, though making the variable public may be sufficient.When to lay down data?nRight now, summary data on each variable is laid down from the first routine, Private Sub InputOKbtn_Click()Log9Started looking at the form routines and organizing them.ActionDate{The superimposed histogram poses special problems. I have chosen to make the class intervals the same for both histograms.1Logic (below) outlines the visual basic workbooksGeneral Descriptionb"Place histogram data in histrange.@Name the histogram chart and check to see if one exists already.Worked on histogram routine.EWorked on histogram routine, including putting results on same sheet.?Is it possible to get the last used range into the input range?Variable Non-missingMissing Unique values25th Percentile75th PercentileMedianMeanDonePretty much done&Clean up display of data in 2 var caseTo do August 18 20024work on scaling so that center is not an ugly numberScale Single variable caseXDetermine how to find size of display so that histogram can be proportionally right sizeOGot pretty far on 2 variable case, scaling of histogram, prepared way for qsort>Need to work on naming the cells, since there may be conflictsAdd percentiles by sorting dataNHow to select and make the resulting cell the upper left cell in the worksheet2This is somewhere in a later chapter; I think het.Perhaps in finance work3Fewer columns for histogram--not in column 27 or 28 Add legend for two variable caseAdd descriptive statsJHistogram--work on begininning bin. Make it start on a 0, 1, 2.5, or 5. name within sheet only,keep track of names of ranges xvalue, yvalue7Possible big change: put all the data on a hidden sheetWork on missing valuesScroll right for more!>http://www.math.sfu.ca/~cschwarz/Stat-301/Handouts/node31.htmlComputing Percentiles#Use Stata's pctile to check results%Send HistogramMaker to Colin Cameron.>How is location of last bin determined? Is max on the border?oNeed to determine whether the observations on the variable are just integers--if so make bin defns accordingly.<Need to check that there are indeed two columns in selection;Learn about error trapping for the is refedt a range issue.mDiscrete Histogram: a sample discrete histogram routine is in the DiscreteHistogram module. It has promise.Found discrete histogram =Timed things and determined that IsNumeric takes a long time!YUse IsEmpty as test first; then go to error trapping--assume integer first, then numeric?TTested reading data in as variant and then checking the variant array for IsNumeric.Bit takes lots of time to read in the data, very little to test it.awidthxxHFix the cancel button from output ply so that it goes back to input ply.^Worked on the scaling of histogram in 1 Var case; good results. Need to extend to 2 variable.Also need to extend the error trapping to the block case. I'm leaving out the row case as it is not needed with only 256 rows.5Still need to work on naming sheets with unique namesZConclusion error trapping is the way to go.--Implemented for column case--works very well.GStill need to fix the sort algorithm. It fails in already sorted cases.{Need to fix the naming of the ranges for histogram charting. Rewrite it the cumbersome way. Done for both 1Var and 2Var.^ Work on scaling.Done.DatesThis has been handled.What about error trapping for the data range in the histogram input form? ' **** error trapping 1004 is not a Range object ****TNote that a range like: Data!$A$11:$B$2 will work because Excel just goes backwards.}May need to work on reducing length of time in Stage 2.. Work on timing of the output button (stage 2) of the histogram form.2Working on scaling for Histogram2Var. Two issues:71) Chart both series--one may be longer than the other.22) Rescale area so that both cover the same area.Add legend for 2 Var.%Add option to view distribution tableMake width the same in both.#Decide on where to have bins start.VHaving reset the width, the strating point needs to be reset so that it is compatible.Removed 3rd page from form=Need to add control over scale--use Histogram from Revisions.3I put in percentile computation for first variable..Find out how to position chart--look at 1 Var.Annotate freq table.QQ plots? Q plots?_Freq tables: format numbers in tables so that they don't have too many digits; add var labels.NWork on width = 0 cases--need to rescale histogram, with new xx and overallxx.gThe number of b< ins is roughly given by the formula advocated by Stata nobins = min(sqrt(n),10*log10(n))2Add 0's if second variable has no values in range.Put labels into 1 Var case.Number Non-missingNumber MissingNumber of Unique valuesHNote: Class intervals include left endpoint, but not the right endpoint._Two problems: (1) output range on same sheet doesn't have correct addresses for chart creation.p(2) Data source can't use active sheet--it somehow has to learn the name of the sheet where the data is located.\Scroll to right place when putting histogram on same sheet. Done for 1Var; needed for 2Var.Data Source: Data!$A$3:$B$30%Change the color on series for 2 Var.%Add gray area for on-sheet histogram.\Add legend for 2 Var--put headings into x, y data range; this will add legend automatically.Date: 28 October 2002HistogramCreator follows the left endpoint included in class interval convention. The right endpoint is excluded (it belongs in the next class interval).done(Enabled Adjust Bins in the Two Var case.Barreto>Enabled Adjust Bins with labels and for the one var Block caseCannot support Adjust Bins in the "same wroksheet as data" case because we need a way to know which histogram is being adjusted.#Idea: Ask user to click on a chart.CSmall change, adding more descriptive and helpful user error boxes.8Added language ID fix and put Log10 in Histogram module.!Uninstall language support added.bFixed the case of width = 0 which caused an error involving Log10--used same approach as in MCSim.FHDid same in Adjust bins modulePChanged formatting of adjust bins and fixed miscellaneous two variable problems.uChanged Dim on index variables so that histogram can dealwith up to 65000 or so observations. (Up from 32600 or so.) 7Additional change: All Integer dims changed to Long. 0This fixes problem I thought I addressed before.&Fixed adjusting bins bug in Excel 2007APrivate Sub UserForm_QueryClose(Cancel As Long, CloseMode As Long%Renamed this to UserForm_QueryCloseX.Bert says Somehow, I don't know how, the QueryClose event has been taken elsewhere by Excel and it is confused. By renaming it, we are fixing it.HAll you have to do is add this line right below the OneVarLocation line:OneVarLocation = "'" & Left(OneVarLocation, InStr(1, OneVarLocation, "!") - 1) & "'" & Mid(OneVarLocation, InStr(1, OneVarLocation, "!"))RThis line wraps an apostrophe around the sheetname (before the exclamation point).It works because apostrophes around sheetnames without blanks or special characters (like parens) are not needed, but Excel does not care if they are there anyway.LThere's more. Bert adds, I got a complete fix for the sheet name problem.,B bEBZG:#ItITOJ/3\`?/[G\!-Rk.sԻ..a濭?PK!֧6 _rels/.relsj0 }Q%v/C/}(h"O = C?hv=Ʌ%[xp{۵_Pѣ<1H0ORBdJE4b$q_6LR7`0̞O,En7Lib/SeеPK!kytheme/theme/themeManager.xml M @}w7c(EbˮCAǠҟ7՛K Y, e.|,H,lxɴIsQ}#Ր ֵ+!,^$j=GW)E+& 8PK!ÄA theme/theme/theme1.xmlYOoE#F{oc'NjGuرhF[xw;23NjHH q Jĥ|@_73xM6{o~(fIyWk"޽aJCR$'Mnlu"^T$}*OIB.bQn̖kC 0>ACMȉ<&J &M5BNe tY>?#!mfKx=[Ԃu}ˆ ~umoLz^W/}ةLo;9iwk/_tV[,ac߬56YvYp1ϡAz 9ۮ7ެe ."Zk1~EȰ RӔ/x$( :7vʗsSj{"bF^x^xz?>~,ɸ7Gg_zy5^|?}V I򋧿>O~I|SQ>19D{<Ÿ8ߊaG@tOE*\ʻ/ yToN:"1Q(v; y4<$jbRa|PŻǴI Y3wJG݈8b2(<& QHT^w/B(`Z!94[Mc˴j`jG7;Q]o YC5*CocU 9 IQ/ RV+`%*;æWѼ9/#~7qZ$*cߓrUngN>%OOi Dh[BvoLJƌB6>p&>w O]>_x.eywQ,5,^<ؾt&9 ԔEЇIIqhJ#f6kAS&2D)p3ӕ5teO`jvzEOG)9cshger-# ~fu-ԙՍh&9܊- 6 AлY3hX"M$#Fz6#b.w*lyhĭɾ̮]nR3+=,)'Kak.zi X 8Ka6!_ 5[ M܆< kW Ds/Z/j@&8?&5- C⫲K3Zw1K|D!`~J0A?Uֶy&,Xg1K#[y$[BTV)bBRvVt=낕@[\׶Dž8d4~_@`rx \kp*O69mY&ԧ HE]HKN!Vj%2BƣJԊ=" u\ӵC&Y0>g4&oN)j rihr"VTU,koy#ŬjQJpRk3܎Ws;ɢ!JT~u "֠ۀW_ Nq֙4)ڬuZˋw֒TvќXHegvtm,{2Da*20V=CoOQ2'@C8D.IrG[Ȥiࠆ)d͛|?&f9>b|w##(ɇ"C *_p=ce΂aenv*Wm瓗{varAˇ$IDpKs6* ʢG0egAnlCYt֏$Ysă)2|FS` uz'Xr*󠍒F`Bi m/Ҷj9Xrmox86tFo˜ b`>ASDbƟPK! ѐ'theme/theme/_rels/themeManager.xml.relsM 0wooӺ&݈Э5 6?$Q ,.aic21h:qm@RN;d`o7gK(M&$R(.1r'JЊT8V"AȻHu}|$b{P8g/]QAsم(#L[PK-![Content_Types].xmlPK-!֧6 +_rels/.relsPK-!kytheme/theme/themeManager.xmlPK-!ÄA theme/theme/theme1.xmlPK-! ѐ' theme/theme/_rels/themeManager.xml.relsPK] {mU7hgY H  G}|Ƀ  dMbP?_*+%&?'?(?)?"{m??&U} m Gh;     P      OV  N   N    T  N  N ~ I @  ~ I@@ 8t !"#%&()*+,-/01345689:;<=>  !~ "I`@ #~ %I @ &~ (I@ )~ *S`@ + , - /~ 0I @ 1 3~ 4IY@ 5 6 8T~ 9Ic@ :T ;T <T =T >T8t@BDEF @T BT DTET FTP PHP0(  >.@???7 Sheet9ggD  $lb~rx  dMbP?_*+%&A&F&?'?(?)?MLilly Printerd*.zzs p    d*"O,,??&U} IB} .B}  } } ;;     ; A" AE B# BD B$ BF Lz B4 AC FBF @ @W F @?@Y@ FG~ @@ @$@(   LA GH~ @@ @S[:XL @(   GU~ @@ @GTs?(   GI~ @@ @DV?( F~ @@@y?( ~ @@@xj1?(  C( DJ ~  E9 ~  D- D"  BL BK  B% B= ~  B& ~ @ B/ B:  B0  B' B+ B, B1 B2 B3 B. B; B< B>BX& Q;;;7-****8** %&'()*+-/0123456789:;<=>? B? %E) &B5 &Bf 'B6 'B8 (B7 (B8 )B@ )BA *BM +BN -BO /BX /Be 0BY 1B\ 2Bo 2Bp 3Eh 3Bq 4Bg 5Bn 6Bi 7Bj 8Bk 9Bm :Br ;Bs <Bt =Bu >Bv ?Bw8@ABCDEFGINOPQRSTWX @Bx ABy BB} CB~ DB EB FB GB IB NEP OER OES PBQ~ PH M@ QBZ~ QH@M@ RB[~ RH`M@ SBl~ SHM@ TB~ THP@ WB| XB{(Tjklmnopqrstuvwxyz{|}~ j kB kB~ kIQ@ lK lB le mK mB ~ mIR@ nB oB pB qB qB~ qIQ@ rL rB sK sB tL uB vB vB wB xB yB yB~ yIR@ zB~ zI@S@ {B |B }B }Be ~B~ ~IT@ B~ IU@0***** B B~ IU@ B Be B Be B B B Be B B B~ I V@ B B B Be B B B Be B B Be B Be~ I@V@ B Be B Be B Be B Be B2*  `nDV(  D D dP(kLY?Text Box 4"b \ PK!Zf[Content_Types].xmlMO &2WR=cJ`F0iK`#̼vLw 9uSq:w`G ^i ½KI)c/ $oVjTMRc|}042ҥCƔM̏P~*ka/8^DkHbL8e i"K\XN\6rco4y@_;oPK!1_a _rels/.relsj0 ѽqCNo^K [ILcX&m߾0XFo;>0xM e`|X}đ I`߽N4aG2$RKIZ)4(M9`ctB{m:f@`3n|O,ܗr޾jxR0T ,0@}WBLǬ5vPK!+Qȫ6drs/shapexml.xmlYn7}/l6d|9 'F4- vk.%[g+.R)]ޖ3Ι9>yeM?4 ILQ?y{}sdB[#B=g'L:0=4qeX7m) zs PuV mZtRd~,ex^$q0gR(jʝ-Rjqgir7y~)v;;;nW\\q9Ӯxvwij=:wx %/ :O r27(WrtP^Z+G*u Q` 9%@Dϗlz]a!P{6f$OV3Me \ZXgKAg1 6j5]q_xu6ωzm''mJ<)+Ea=ւ· iD4U+DkqKVٹKXL; O^_aWݝ%m9 #~r$zK/L,2LM\Bgg 9UŦͽ1#K*9QD8~iý] /T8B0IHhR:5"Fa}5f*; [q)iAc-ӎ[WtOTd>nXOy;@Y!B*>}p7vK;A R"ń'N z^?灎U4 xm-Zӡ*mfr*;;hUV] hi#ޤ1VOuuSaZo QG6l Y @AYJ1$, M:QW|*PBZ 5k%("Mp5Q)cں,Tr#WDYJ>4BM!AEpƷ ;œQ_I@k `#Oȗ7 cgGQO~t= qSV,`sZLu] \ٹXmf|)e@,T.M9m6sܳ ~[<4ܡd[ajYHQ_S<4*ީ0g?8YȳgϨOᅓl\9@}0j=q50$neWߏ0 W>4=$Mtr[ &8P Mڱ>_؞BLK~KʢS2 ߭xz#b;صڸKؕ lGF֖["rW[eVϓEܢ2b@],Y c]'IYDه<m(k͇Y:9f`>LWW6>O cJ?ފgf[4հƃSʔLȍ`` UhvGx+,ZdmI[a{; o=xʆlZ+a/*עV%绫! tr~6#wjە+/QvTmFڼBmOoPyFr)0|eC Pkoo*׫/2YZf'./5;Yٯx~K"Z,uh}~Wa'L6ݹ0ZwOCG,¢;G0MvQq䐌8t~&A_W'PK-!Zf[Content_Types].xmlPK-!1_a /_rels/.relsPK-!+Qȫ6*drs/shapexml.xmlPK-!.! drs/downrev.xmlPKQ  2)K]`P  s<thttp://msdn.microsoft.com/vbasic/productinfo/previous/vb6/tips/00pasttips.asp#8-21-00 Add Web mouseover effects to Visual Basic One common effect found in sites all across the Web is what's termed the mouseover effect. This effect usually provides some form of limited animation in a Web page element. For instance, when you move the mouse over a button, the button changes color, giving it a glowing appearance. Given an understanding of Visual Basic's mouse events, you can easily supply these same effects in your own applications. To imitate the same graphical effect in a Visual Basic project, use the MouseMove() event. As its name implies, this event lets you track the mouse's movement over controls, forms, and MDIForms. For forms, this event follows the syntax: Private Sub Form_MouseMove(button As Integer, _ shift As Integer, x As Single, y As Single) Where button stores the current state of the mouse buttons; shift indicates the state of [Shift], [Ctrl], and [Alt] keys; and x and y the current mouse coordinates. To illustrate, launch a new Visual Basic project and place a command button on the default form. Next, set the control's background color to yellow (&H0000FFFF&) and make the font 8 point. Finally, set the Style property to 1-Graphical so Visual Basic will display the color. Now add the following code Private Sub Command1_MouseMove(Button As Integer, _ Shift As Integer, X As Single, Y As Single) With Command1 .BackColor = vbGreen .FontSize = 12 End With End Sub Now, when you run the project, the button turns green and the font size increases when you move the mouse pointer over it. To turn the button back to its original state when you move the mouse pointer elsewhere, add the following event: Private Sub Form_MouseMove(Button As Integer, Shift As _ Integer, X As Single, Y As Single) With Command1 .BackColor = vbYellow .FontSize = 8 End With End Sub <!V!!!!!!!7!d!e! ! !:!;!o!!!!!!!!!! !-!;!R!a!j!r!s  D d (kLY?Text Box 5" PK!Zf[Content_Types].xmlMO &2WR=cJ`F0iK`#̼vLw 9uSq:w`G ^i ½KI)c/ $oVjTMRc|}042ҥCƔM̏P~*ka/8^DkHbL8e i"K\XN\6rco4y@_;oPK!1_a _rels/.relsj0 ѽqCNo^K [ILcX&m߾0XFo;>0xM e`|X}đ I`߽N4aG2$RKIZ)4(M9`ctB{m:f@`3n|O,ܗr޾jxR0T ,0@}WBLǬ5vPK!-drs/shapexml.xmlXo6᠗X#KFu@M;,QHڲ}w?-dFqOŦVZAFR4"P(i6x1Pe6@,@5fцf mjtj`Kk9F6F`nK!܏L0]_ )_zPatQ107(4JiŴ~$9=Q)~8N/hpe%ǰN8Y;&j}\+UNnQ k? $ఐw0&^8؝3R$T*Q-KCڔ[@;oo[Fh9aƕզ0c!v(T#-aJi142^0 %p C᥍g Q9*X׉ڋ~Ѳ/+) 3X\(vٽ)cAdtu0 : .pʽV;R" s|,?EWWT&;zRzZMWhDE>GCJexqNd =4pS-K (un+c{35⃞̇rIG$]EO]=MτܴwiI! :xM~-, Tin(ԃGm# ̈KSd\8}<|w|mҁUX@k|\;tg(#Q(*X8,]-g\&/ďƛPdPOpO/p?DB[ L͊a 0P>V@' S |߇jDh +̚2K+^pU៖|RN,yFt"J\ %R z}Ivja3S5nV4V W75Jױ>͒RܛJJQ"%mXya_ӜC 4%E`H}DZ&D(T^byYD;tZYzD]W=> wxj]kd}JrJf7=qCoPRQ٭vP׊VXi}~.]aEAݻ>&"<1*|_GoIٸ/>G*;|#wcUOPK!*drs/downrev.xmlLP[O0~7?4#`cBM 4F]dkPvḩJQFsZ ҉8=8/ъN9./b Vf3! z@KrU 2ȥVh3*bxU6c]ZB\>Wz]qx5˘MlgU3UHD$và$VsἲEFX)':ɍݿSk*b͖C$1A,Mh ۽8:PG((b@~o~#Gm1#~Ο;PK-!Zf[Content_Types].xmlPK-!1_a /_rels/.relsPK-!-*drs/shapexml.xmlPK-!*pdrs/downrev.xmlPK{Yj]` ` lX<mhttp://www.math.sfu.ca/~cschwarz/Stat-301/Handouts/node31.html: There are many ways of computing percentiles, we will use X(np +) which means to take the next observation above np if np is not an integer, and the average of this and the next observation if np is an integer. The () around the subscript means the position after sorting from smallest to largest. Percentiles are normally computed only for interval or ratio data. For example, if a dataset had 75 observations, then the 25th percentile would be the X((.25)(75) +) = X(19), i.e., the 19th smallest observation after sorting. The 40th percentile would be X((.40)(75) +) = (X(30) + X(31))/2, i.e. the average of the 30th and 31st smallest observations after sorting. Stata: Stata's pctile default method for pctile is as above. The alternate method uses interpolation. See Version 7 Reference H-P p. 498. <X!@!A!!!"""!H!lxx D 6pCC@V],@p T9 $<Show Histogram Form<P>@7 Sheet2ggD  d.3@FWid{0̰h8 l-Jh? @ٌ ALLh? @&9h? @Ox9b? @@Q? @3߲B; @"F%@ @z*(? @ֳUA9$@(  @d @Yd~@ @@@@Z@@@@@@ @ @<&G_? @79?8f? @Zh? @gQceg? @Kijg? @"˜Ph? @* @Hj? @yh?m; @?@@ @(@(  @ @qG @ @@@Z@@@@@@ @ @* @* @* @* @* @* @3a? @sD? @ K; Q] R Q QQQQQQQ 8&: @@@@ @0@( @ $ @@@@Z@@@@@ @ @OH(D`? @.{]f? @GPh? @I!jg? @^g? @!YZh? @a? @D^? @m)Y; Q Q;@Q;@ QQQ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&?r@$Yv>s@sbtL@~ s@*@ s@@s@x<ŗ?s@Qd> t@~ t@*@ t@@t@`6Oz?t@D^=>u@sbL@~ u@*@ u@@u@0?u@.,> v@~ v@*@ v@@v@#0?v@ HD>w@sbtM@~ w@*@ w@@w@H6?w@t2n> x@~ x@*@ x@@x@8_!l?x@'U>y@sbM@~ y@*@ y@@y@08?y@F1^> z@~ z@*@ z@@z@0޹"?z@# 7T>{@sbtN@~ {@*@ {@@{@$c?{@>|@sbtL@~ |@*@ |@@|@?|@6 > }@~ }@*@ }@@}@X™^?}@~Eu:0>~@sbL@~ ~@*@ ~@@~@_?~@g9K> @~ @*@ @@@@ c^R?@Pi>@sbtM@~ @*@ @@@ן|?@1>D lRNRNRRNRNRNRNRNRRNRNRNRNRNRRNRN @~ @*@ @@@cH?@PJк>@sbM@~ @*@ @@@}u?@Q> @~ @*@ @@@f*r_?@j%>@sbtN@~ @*@ @@@$F?@詟 6> @~ @*@ @@@}ɸou?@U>PNRNR   *(  p * c 6NChart 34 ]*@  PP PZaajk&?'?(?)?"??3&PH0(  @3d23   M4 3QQ ; #99Q ; #88Q3_  MM   dR R R R R R X6"#S S4ES S 4 3QQ ; #::Q ; #88Q3_  MM  !!dR R R R X6"#3S S4ES S 4D$% 03O&#Q4$% 3O&#Q4FA N 3On% 3*&&@&#! 43*#! M43d" 44Dn%  P4?ubGR?K?tM?% KWV 3O,|&$Q ,Histogram of A And B'R R<-oXU?::?XS S4 X6[3S S 4eeeX xx  6PqCC@f-],@PqITgp9 $<Histogram Maker<cxx  6qCC@x4],@q`I$gq9 $<Histogram Maker<cP>@7 Sheet1ggD ThisWorkbook Cb__SRP_4__SRP_5Sheet1  !"#$%'()+-./0123456789:;<=>?@ABCEFGHJLNPQRSTUVWXYZ[\^_`abcefghijklmnopqrstuvwxyz{|}~rU h1 1Yq  1;Y 1 $4  `` IW<   $ `KFp t! t t>pF`P  P:@]3t6`P6` @"%t! t `c ]@t5`CxM` (%'%'%'%'%: %:@%t! t ``1xt5`Cxm: %lxF %:@ %t! t d H   , P) t5P`(x0 pt`P044PrU @$`$A` nDr]]#<7bB)4D7> F) zE4] x) zE4] 7bB)4D7>ME(SLSS6"N0{00020820-0000-0000-C000-000000000046}(%H@h %2 %Xp@@\\0WJ$*\Rffff*1>4a5709b64xAttribute VB_Name = "She@et1" Bast0{00020820- C$0046} |Global!SpacFalse dCreatablPre declaIdTru BExposeTemplateDeriv$Bustom izD26 D h$MprU 3hAh!4ih! h__SRP_16&__SRP_17*BSheet2/,__SRP_18D4`amientas "%*rU @n. Worksheet Menu Bar "%,%.%.B@0oJX]]#<B DN- FGD}ixGD}iɊB DN-MEL$2 ]]#<nw#HvecFCj/{xCj/{nw#HvecME0[LSS6" LLLL<4<8<<<N0{00020819-0000-0000-C000-000000000046}8 @`8|k `o` xmu%@ %0 %"(@t @p @` @(P @@@ @0 @X @p @ @ @ @ @ @ @ @ @@WJ$*\Rffff*0d4a5703a2$*\Rffff*0e4a5703a2*\R1*#fc*\R0*#f*\R1*#6d*\R3*#8c*\R3*#4d*\R3*#4e*\R3*#4f4" "0 8 "@ 2H   F 6 D h$Mp Hm  Put the Wizard menu item inJ1A@o@@+ Delete the new menu command from the Tools menu.hcheck language] "!$$WThanks to John Talyor ( "%&Tools' =it's not English, try to get the word for Tools from the userdThe 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 "%*' 0pk`dXTools' Pk@ Histogram ... Worksheet Menu Bar "%,%.%.B@0oNAttribute VB_Name = "ThisWorkbook" Bas0{00020P819-0C$0046} |GlobalSpacFalse dCreatablPredeclaIdTru BExposeTemplateDerivBustomizD2Sub _AddinInstall() ' Put the Wrd menu item inqddHi)gramM I EnLd + 0Uni1 ' Deleف4newA3comma$fromATools D.On Error Resu}Next'check languagVDim myA As Sng If Left(Application.Oper@ngSyBs7, 1)W " TheA'Thanks to John Ta0lyorInternal(xlNonEnglishFuncAs) <> Ae?D:)A?'it's not A, trygekwojfB8Puse&E§ K*putBox(F"8L ofais~B2Exc@el doe$a ppearA#be(US. PleMAeAe )tha1BusiHng .onB mainacroFsZtop$e screen. F`y!en @ whomY I've borrowed many ideas as well as specific code (RNGandSortModule, SD, ToolsMenuSetUp)0 David Mahary assist]'xME(6 << <Hxp88%(WJ$*\Rffff*1@4a5709b6VV   ( @@ ` 6 2 P `        ( "@ 0h 4  L 8 JP ,  X 0@ :p .  B @ :X @ < 8 XP  * H @ ` h 4  " , 0 &P x    *  8 P 6p &   6 P X H` >   Documentation/C Author: Frank HowlandROGR9 Considerable assistance from Humberto Barreto, from whomY I've borrowed many ideas as well as specific code (RNGandSortModule, SD, ToolsMenuSetUp)0 David Mahary assisted in writing sort routines.ol, All rights reserved by Howland and Barreto.d for Howland: howlandf@wabash.edu 765-361-6317 Barreto: barretoh@wabash.edu 765-361-6315 Both: Department of Economics Wabash College P.O. Box 352r\ Crawfordsville, IN 47933U) Date of latest modification: 18 Jan 2003-Barreto Added enabling of different languageson1!Barreto 1/21/03t EBin Adjuster code works for One Var Hist on its own sheet, one column:!Barreto 1/9/03$m?CStill won't run on Mac -- adding chart gives error on a Detchon MacRǽ& Very frustrating and makes no sense~Barreto 12/14/025QRemoved all Timer references by commenting out in an attempt get it to run on Mac) Suggest use of VB's own Timer function4Added Bin Adjuster form, but cannot get code to work(Fixed R1C1 so it works even on own sheetBarreto 11/21/02;Added code to make sure the workbook is not in R1C1 displayBarreto 10/30/20024Redid interface to reduce amount of text in the formSub:Added code to ThisWorkbook to run on install and uninstall6 Install: Gives user a message of successful loading2 Uninstall: Removes Histogram... from Tools menuRDeleted an extra AddHistogramMenuItem macro that was causing an error on uninstall Modified 17 August 2001# Put in BasicFour for summary statsB Put in some documentation in VB Code for Histogram Generator form and in this module Description of Modules:- HistogramGenerator form has code which  reads in the data  calls the histogram routine& Histogram module has code which  draws the histograms SD module has code which  computes summary stats RNGandSortModule  generates random numbers sorts data# Documentation is this module General  general routines Discrete Histogram 0 contains ideas for histograms for discrete data HistRoutinesFromRevisions  contains additional ideas ToolsMenuSetUp/ ' sets up the add-in on the menu barA See Notes and Documentation sheets in the workbook itself.7 *** comments indicate areas in need of attention@Histograma__SRP_at.__SRP_b'OcHistogramGenerator&"*\R1*#79*\R1*#2ba*\R1*#1d*\R1*#2b9*\R1*#11*\R1*#335*\R1*#29e*\R1*#248*\R1*#21c*\R0*#14*\R1*#2d*\R1*#32   0 4H F   " 8 H .h " +  "    (08@HPX`hp  P (08 H`h ,x    (02]] x /C`ME\@ f(|>  LLL**<`X`p$k B`XPk )D etTil" () As IF ngI IH 8IJ XpswIL xIN$ IPX( IR8, pm IT0 IV4 `i7`Xxx^w`Zt"0 \px0ir#Q~` ^0lt (c Corp.1``don1!`b\oot eX>c% hT85:!  jPp|1Z Ob{X`lLnC2`nH1 `pDeIR`r@zw`t85`v0`x@( in z$8 run% ~H X of %`4Ad`m, b o wo`et 02%`e th` R1C`Ba`x4Re`uce e fo%    x0Remo%`pmenu`hra A`macr`` n er`H|  M`8X01`Tour  H`%k ) X`formn this m @)of M His I I  cI I   I$ @I( `I, I 0 IN4 IP8 I"<  I$@  IR D @ IV`H `Xx`Zt \p   ^x l  ``d`b\ e XH %`& P (L   *H   , D   .` @@ ( `l@ <`n 8`p` 4`0 0`2@,`4`$`6x `80 `: `<H `>`@ ` `h `J `L    `B `D   H %`F xh    ` ``0 X 8 T0%8 X x`JP X`X (`h  `P  ` `  x`"+!!V )\  )^ )D@H  P (IF hncluI< I e DeI$ ib ")h(Dis Long )j,@rtTi() by Ho (`Xxon E`Zt'En ^`(kwI 0I ank `hx0`p`0DkP Ih  d ` ,kI ls--I ary `x`Xt X`8pk`I I< xvalIT Ip`  IP !CaIh xx)`x <  tPI% `k))Ij jI JIl  `ntI`pl'`rdK`\{`tT`vL+\`xH<@XpXH x:P@@`l H(bk @(\ H@L %@D $j0xP` @hxPX(<|@ @@ B@@p !@ Di@| @X stna@ H hist@8 & 2@4 R" 5bins *@0 numb5", '" @8 @ ber @h  * 2@ mber@ 6Ac@ ecti@ test@ @ >9@0 HE9@ (X0E!0H @ @ @ m of@ `X  @8 `9X\9h .MajorithP`Di@%8fing@ `chechjr char@l ***@\ istoP`L%Name =(@Xp@8 .Row@( P@ Widt`  N!@  N@ @  8p(@d '@ T !@D !@84 @P$ H@h r of@ rigi@ ram @ @@ @ wn O@ ns@ @ t Nu|d^ns <@X @t Ca@p rRevX ( p @@ h @X @ H `@ 8 @( !X!!!@p!d @"T @D @!@ !!@< !!! @, H`Hh8#"""@ #d @"` #"@#\ #"@P#L @h#< @P$, @ #"@# ## @# ## $#@$ 0$#@  @$$$@ @%(%%@ Fn Fn Dn n @X%l )Qn @p%\ Dn @%L estr@%< /> @%, CFn @% En @ Kn @ \Cn    P 0 h'p(&&&,,',0'@& Type@' On @X( Kn |pl@| attr@'h Jn @@'P Dn X''|n }Fn @(L HFn (@'|n ompl@'H e="e@'D Ln @@ tion@'0 =Cn @' In @' Gn @( Kn @(( En @@( UNn @) Qn @ - Ln @+ Hn (@'n Pn @( efin((n (Dn @( n gr((n Jn )(Hn @8,L `eLn P,,n LEn @`,H `,8,n Mn ,Dx,`@%,`,n Pn @4 Ln ,,n En @0`-,+RVHn n @P-, `Dn p-,@8- In @ h-`In L%P-0n \Rn X X WJ$*\Rffff*0h4a5703f6*\R1*#336*\R1*#220*\R0*#15$*\Rffff*0c4a5703a2*\R1*#337*\R1*#10d*\R1*#101*\R1*#3d*\R1*#100*\R1*#16d*( H`%x%2.* (84(P>U"+<g$P `p 6a "5  !"+ "+H p &  7 T9@ `  < 2 7    7  ( 0  "8 2H 0X 2h  !x >   $D  7   $ 8 @ @` , " F @ $P $h , & 2 2 $9 $9@ $h              ( ( ( $0 ZHD &! $!0H P " X ` H *`   (0 8PX`4h 4   X `    T@ H ` p x    :0 P X` h px       8   (08Ph   (8PX`h p(   ##41( ` xP(>U"+0<gX$  56_ 0PX(+p   "*   "+@"+h  & 0 8 0(@ ` x ## 21  .+0.+`0`  6_ (H 4(` >U <g $ ( 8 %P p56_ ""+ 0 @P %h "+   "+ J?@  $  ! ! !(!0!8! &@! &h!  7! !T!9" ("0# 8$ <X$ >$2$7$%%%7%0%8%@% "H%2X%0h%2x% !%>%%%6Y%%6& & *(& 8& @& H& P&X& 7`&x&& &&  "& ,& ,& ' D(' p' :' ' $'$', (& 8(2`(2($9($9( $( $) ) 0) @)H) P)X)`) p)x) )) )()() ) $) Z)DH* &h** $*** * + . + P+`+ :h+ 6+ + , Hh- ,- - - .. @. `. . . ". &. / 0/ P/ p/ / / / / 0 P00 <0 0 20 1 .81 0h1 (1 :1 "2 &(2 4P2 2 2 $2 42  3 4@3 x3 3 (3 3 3 3 T3 DP4 4 4 4 4 4 5 (5 H5 *X5 5 5 5 5 5 *5 6 06 ,P6 6 06 6 *6 26 207 h7 7 <7 (7 8 (8 @8 P8 p8 8 88 8 8 8 9 09 4@9 4x9 J9 : :  : @: `: 4p: 4: J: 0; @; P; p; 2; ; ; ; < <  < (< $0< NX< < < 0< &= 8= @= &H= &p= = 2= 2= l> > > D> ?  ? \@? P? 6? \(@ (@ .@ <@  A ,0A Z`A $A A A :B XB $hB B B 6B B C C &C 0@C 0pC C C C C (C 2D :PD D $D ND 0E @E `E &xE &E E 2E 2F @F jHF F @F @G PXG $G ^G ,0H F`H TH `I ,`I 2I @I 0J 8J 0PJ J ^J J $K (K 6HK K (K ,K 0K L 0L @L 6`L L L L L L L &M 0(M ZXM M FM N 0N PN hN N N N N N N O 2O @O XO xO O <OO NxP P P Q R >S >PS &S ,S (S (T 8T (PT (xT (T T (T &U 00U &`U U *U U U ZV xV 0V V $V "W "0W $XW W W W 0W (W $X &0X XX pX &xX 0X 2X "Y 0Y D8Y Y <Y Y *Y Z Z ( Z "HZ 4pZ 2Z HZ F([ Pp[ P[ \ \  \ (\ 0\ P\ $X\ (\ \ \ \ \ \ ] " ] H] `] p] ] "] :] >^ @^ `^ "h^ ^ \^ $^ , _ &P_ *x_ &_ _ _ _ _ ` ` 00` `` p` " ` `` ``a / a @a Papa aaaaaaa b $b@bXbhbbbbbb c / c&@c `c" hcpcxc c cc(ccB c6,c d" dd d  (d 8d HdXd pd dd dd " ddd<od e e  e*0e@e*HeXe`e"hee e<oe*e<oe*0f@f*HfXf`fhf" pfxfffffff f f ff fff"g$ g$8g$Pg$hgg g g g gg gg gh h h(h0h@hHh#Phhh #xhh h Histogram0/C 22 October 2002 Printed 7/7/04- Modified to include NewLimits routine 7/7/04x] ?Private Declare Function timeGetTime Lib "winmm.dll" () As LongenDim lngStartTime As LongSub StartTimer()oulngStartTime = timeGetTime() by HoEnd SubetFunction EndTimer() 'EndTimer = timeGetTime() - lngStartTime End Function HiA@@o0X Written by Frank Howland]]0]H The bins]]]]]]@]x]]]]] @]`xI Get the variable labels--this routine may be unnecessary if public works] A$'r]] L J 'p]0]H]`x&Call Limits(minval, maxval, Width, xx) ' L'd0 J  Ak!Call NewLimits(minval, width, xx) L  'pG  < T p PAI <\G <^G < h < jG]8PJ$\$^ D F <  $h$jA @I P%!'+ RK X <{ X$\  G X+\jNo. Obs. P, X $\ to  X$\ X  P, X$^ X  P,? X  P% X  P%$|.G !B@H !'J   G 'j XG P% <  P%$|.G AH $(k Z < H Z$h Z % P,G Z$j Z & P,J ZG]h ' < G 'jJHistogram TitleG B@G  (I% P% < & P%$|  B@  N! B@Dim testname As Stringhtestname = "=SERIES(,'" & histsheet.Name & "'!R1C" & 27 + number * 10 & ":R" & Nobins * 2 + 2 & "C" & 27 + number * 10 & ", '" & histsheet.Name & "'!R1C" & 28 + number * 10 & ":R" & Nobins * 2 + 2 & "C" & 28 + number * 10 & ",1)"6ActiveChart.SeriesCollection(1).FormulaR1C1 = testname !B@H  %99q  %99q ( !B@H  !( !B@H B@  %B@0 9 Histogram of r5!(dq   % 9 <$\9 .MajorUnit = tickwidthqDim chartName As String9 **** Need to check for other charts named Histogram ****&chartName = "Histogram" '& Varlabel(1)ActiveChart.Name = chartName@ Count the number of chart objects and then just assign the last] P%!' P%!' P%!'.RowHeight * 14 P%!'" Width * 6  N!! N%(  N!! N%(   N!! N%(   N!! N%( P%B@] P!'dP'k@ P!'d 'k  P!  9 P!  9q P%B@HTPut down number of bins used for the original (default) histogram and latest version$!  put down Original Number of Bins < P,Put down Latest Number of bins < P,koCall HistogramMaker2VarRev(values1, values2, publicnobs1, publicnobs2, w1, w2, MINvalues1, MAXvalues1, MINvalues2, MAXvalues2, histsheet, histRange, ViewTable, 1)' 21 Oct 2002A In this revised version I use the methodology from HIstogram1Var$ for setting limits on the histogram]` ]x ]  The bins] ] ] Dim Nobins As Long]0 Dim histsheet As Worksheet]P ]h ] ] ] Dim noobs As Long]H ]` ]x ]  ) keep track for scaling purposes]   ] ] 8 ]P ]h  ]  ] ]  ]0 - Find overall max and min for the 2 variables 'JMsgBox histRange.Address   G 'Jj 'L   G 'Lj A$'<$'>M Same as HistogramMaker except adjusted to accept two series on the same plot]P  First variable ' '4dx   4AkX ' '6d0   6Ak 4 Choose the larger Width as the class interval Width    ******* 'B'ld 'B'lk   'B'lkX   'B'lk0 1 This gives us parameters for the first histogram 4 6 l 4'Dd 6 4  B'F 6 F B 'D D 4 G D B 'Djkp dh l 6'DdH 4 6  B'F 4 F B 'D D 6 G D B 'Djk k B p L J 'Bd 'Bk k  D 'p  2 " p PA p B '2 2\  2^  2 (  2 * $\$^$  2 B D$($*A ]  R X 2 X$\  G X+\j>avoid rounding problem X $\ to  X$\ X  P, X$^ X  P, X  P% X  P%$|. !B@ !'   G 'j X $( P% 2  P%$|.Call PutInBox(myboxRange)k X 2 X$\ X  P, X 2$\': Put down labels Z Z$% Z P, Z Z 2 Z$( Z % P, Z$* Z & P, Z reset bins for second histogram*Call Limits(minval2, maxval2, Width2, xx2)2 This gives us parameters for the second histogram  D 'p  0 $ p PA p B '0 0\P 0^p 0 , 0 .$\$^   0 B D$,$.A R No. Obs. in $ P, No. Obs. in $ P, P% P%$|(H 0 2  why is this column 4? P% 0  P%$|.Call PutInBox(myboxRange) X 2 0 X$\  G X+\j X $\ to  X$\ X  P, X  P% X  P%$|. !B@ !'   G 'j X  P, X $(d` P% 2  P%$|.k  A X 0 X$^ X  P, X 2 0 X 0 2 X  P, Xk` X 0 X$^ X  P, Xk Z 0 Z$, Z % P, Z$.   Z ' P,?* (Width1 / Width2) Z 0$\ : G 0$\':j Figure out chart scalingDim tickwidth As Single] 2 0 2'Jd 0'Jk myname1 = histRange.Cells(1, 38) myname2 = histRange.Cells(1, 39) B@  (% P% J ' P%$|  B@  N! B@gtestname = "=SERIES(,'" & histsheet.Name & "'!R1C" & 27 + number * 10 & ":R" & Nobins1 * 2 + 2 & "C" & 27 + number * 10 & ", '" & histsheet.Name & "'!R1C" & 28 + number * 10 & ":R" & Nobins1 * 2 + 2 & "C" & 28 + number * 10 & ",1)"ftestname2 = "=SERIES(,'" & histsheet.Name & "'!R1C" & 29 + number * 10 & ":R" & Nobins2 * 2 + 2 & "C" & 29 + number * 10 & ", '" & histsheet.Name & "'!R1C" & 30 + number * 10 & ":R" & Nobins2 * 2 + 2 & "C" & 30 + number * 10 & ",1)"ActiveChart.Activate6ActiveChart.SeriesCollection(1).FormulaR1C1 = testname7ActiveChart.SeriesCollection(2).FormulaR1C1 = testname2 !B@H  %99q  %99q ( !B@H  !( !B@H B@  %B@0 9 Histogram of < And  >5!(dq %LB@H 0  !N99 R9P V9Tqk  % D9 :9.MajorUnit = tickwidthqP (%ActiveChart.Legend.Position = xlRight&ActiveChart.SeriesCollection(2).Select]=teststring = Left(ActiveChart.SeriesCollection(1).Formula, 7)MsgBox teststring4ActiveChart.SeriesCollection(1).Formula = teststring] P%!' P%!' P%!'.RowHeight * 14 P%!'" Width * 6  N!! N%(  N!! N%(   N!! N%(   N!! N%( P%B@Z P%B@]0 P!'d'k P!'d'kp  P!  9 P!  9q0 P%B@HTPut down number of bins used for the original (default) histogram and latest version$!  put down Original Number of Bins J P,Put down Latest Number of bins J P,kTime(8) = EndTimerFor j = 1 To 8( histRange.Cells(14 + j, 1) = Time(j)Next jo3 Above is the new version of Sub HistogramMaker2Var0 Below is the old version Sub HistogramMaker2VarSub HistogramMaker2Var(values1() As Double, values2() As Double, noobs1, noobs2, Width1, Width2, minval1, maxval1, minval2, maxval2, histsheet, histRange, AllLongs1, AllLongs2, ViewTable, number)'Call HistogramMaker2VarRev(values1, values2, publicnobs1, publicnobs2, w1, w2, MINvalues1, MAXvalues1, MINvalues2, MAXvalues2, histsheet, histRange, ViewTable, 1)' 21 Oct 2002B' In this revised version I use the methodology from HIstogram1Var%' for setting limits on the histogram Dim i As Long Dim j As Long( Dim binleft() As Single ' The bins Dim bincount() As Long Dim Min As Double Dim Max As Double 'Dim Nobins As Long Dim mySheet As Worksheet 'Dim histsheet As Worksheet Dim binwidth As Double Dim x1() As Double Dim Y1() As Double Dim x2() As Double Dim Y2() As Double 'Dim noobs As Long Dim choice As Long Dim col As Long Dim valrange As SingleJ Dim Nobins2 As Long, Nobins1 As Long ' keep track for scaling purposes5 Dim xx1 As Double, xx2 As Double, xxmin As Double Dim maxbin As Double, Dim myname1 As String, myname2 As String Dim mult As Long' Dim leftC As Double, topC As Double* Dim minval As Double, maxval As Double" Dim Varlabel(1 To 2) As String3 Dim overallWidth As Double, overallxx As Double Dim TableRange As Range 'Dim Time(1 To 8) As Double.' Find overall max and min for the 2 variables 'StartTimer minval = minval1 'MsgBox histRange.Address. If minval2 < minval1 Then minval = minval2 maxval = maxval1. If maxval2 > maxval1 Then maxval = maxval2! Call RetrieveLabels(Varlabel) myname1 = Varlabel(1) myname2 = Varlabel(2)N' Same as HistogramMaker except adjusted to accept two series on the same plot>Dim isub As Long, width1zero As Boolean, width2zero As Booleanwidth1zero = Falsewidth2zero = False' First variableIf Width1 = 0 Then Width1 = 1 xx1 = minval1 width1zero = TrueElse$Call NewLimits(minval1, Width1, xx1)End IfIf Width2 = 0 Then Width2 = 1 xx1 = minval1Else$Call NewLimits(minval2, Width2, xx2)End IfIf width1zero = True Then& If Width2 < 1 Then Width1 = Width2End If)If width2zero = True Then Width2 = Width1$Call NewLimits(minval2, Width2, xx2)+'Call Limits(minval1, maxval1, Width1, xx1)+'Call Limits(minval2, maxval2, Width2, xx2)'Time(1) = EndTimer 'StartTimer5' Choose the larger Width as the class interval Width"If Width1 > Width2 Then ' ******* overallWidth = Width1 choice = 1Else overallWidth = Width2 choice = 2End If2' This gives us parameters for the first histogramIf xx1 < xx2 Then If choice = 1 Then overallxx = xx1 Else. isub = Int((xx2 - xx1) / overallWidth)- overallxx = xx2 - isub * overallWidthD If overallxx > xx1 Then overallxx = overallxx - overallWidth End IfElse If choice = 2 Then overallxx = xx2 Else. isub = Int((xx1 - xx2) / overallWidth)- overallxx = xx1 - isub * overallWidthD If overallxx > xx2 Then overallxx = overallxx - overallWidth End IfEnd IfIf overallWidth = 0 Then If valrange > 0 Then, overallWidth = (maxval - minval) / 2 Else overallWidth = 1 End IfEnd Ifvalrange = maxval1 - overallxxHCall DriveFormatting(Width1, Nobins1, AllLongs1, valrange, histRange, 1)'Time(2) = EndTimer 'StartTimer*Nobins1 = Int(valrange / overallWidth) + 1'binwidth1 = valrange / Nobins1 ReDim binleft(0 To Nobins1) ReDim bincount(1 To Nobins1), ReDim x1(0 To 2 * Nobins1 + 2) As Double, ReDim Y1(0 To 2 * Nobins1 + 2) As DoubleeCall MakeBins(binleft(), bincount(), values1(), noobs1, Nobins1, overallWidth, overallxx, x1(), Y1())'Time(3) = EndTimer 'StartTimer>Dim myWidth As Double, maxwidth As Double, myboxRange As RangeIf ViewTable = True Then For i = 1 To Nobins1U If Abs(binleft(i)) < 1 * 10 ^ -6 Then binleft(i) = 0 'avoid rounding problemI histRange.Cells(i + 18, 4) = binleft(i - 1) & " to " & binleft(i)0 histRange.Cells(i + 18, 5) = bincount(i)V Set TableRange = Range(histRange.Cells(i + 18, 4), histRange.Cells(i + 18, 4))" TableRange.Columns.AutoFit( myWidth = TableRange.ColumnWidth5 If myWidth > maxwidth Then maxwidth = myWidth Next i% Columns(4).ColumnWidth = maxwidthT Set myboxRange = Range(histRange.Cells(17, 4), histRange.Cells(18 + Nobins1, 5)) Call PutInBox(myboxRange)End If For i = 0 To Nobins14 histRange.Cells(i + 2, 24 + 10) = binleft(i) Next i maxbin = binleft(Nobins1)' Put down labels For j = 1 To 20 histRange.Cells(1, 37 + j) = Varlabel(j) Next j For j = 0 To Nobins1 * 2 + 1* histRange.Cells(j + 2, 37) = x1(j)* histRange.Cells(j + 2, 38) = Y1(j) Next j'Time(4) = EndTimer 'StartTimer!' reset bins for second histogram+'Call Limits(minval2, maxval2, Width2, xx2)3' This gives us parameters for the second histogramvalrange = maxval2 - overallxxHCall DriveFormatting(Width2, Nobins2, AllLongs2, valrange, histRange, 2)*Nobins2 = Int(valrange / overallWidth) + 1'Time(5) = EndTimer 'StartTimer ReDim binleft(0 To Nobins2) ReDim bincount(1 To Nobins2), ReDim x2(0 To 2 * Nobins2 + 2) As Double, ReDim Y2(0 To 2 * Nobins2 + 2) As DoublecCall MakeBins(binleft(), bincount(), values2, noobs2, Nobins2, overallWidth, overallxx, x2(), Y2())If ViewTable = True Then9 histRange.Cells(18, 5) = "No. Obs. in " & Varlabel(1)9 histRange.Cells(18, 6) = "No. Obs. in " & Varlabel(2)I Range(histRange.Cells(18, 5), histRange.Cells(18, 6)).WrapText = True If Nobins2 > Nobins1 ThenX Set myboxRange = Range(histRange.Cells(17, 4), histRange.Cells(18 + Nobins2, 4))& For i = Nobins1 + 1 To Nobins2@ If Abs(binleft(i)) < 1 * 10 ^ -6 Then binleft(i) = 0M histRange.Cells(i + 18, 4) = binleft(i - 1) & " to " & binleft(i)Z Set TableRange = Range(histRange.Cells(i + 18, 4), histRange.Cells(i + 18, 4))& TableRange.Columns.AutoFit, myWidth = TableRange.ColumnWidth9 If myWidth > maxwidth Then maxwidth = myWidth* histRange.Cells(i + 18, 5) = 0 Next i) Columns(4).ColumnWidth = maxwidth ElseX Set myboxRange = Range(histRange.Cells(17, 4), histRange.Cells(18 + Nobins1, 6)) End If Call PutInBox(myboxRange) For i = 1 To Nobins20 histRange.Cells(i + 18, 6) = bincount(i) Next i! If Nobins1 > Nobins2 Then& For i = Nobins2 + 1 To Nobins1* histRange.Cells(i + 18, 6) = 0 Next i End If For i = 1 To Nobins20 histRange.Cells(i + 18, 6) = bincount(i) Next iEnd If'Time(6) = EndTimer 'StartTimer For j = 0 To Nobins2 * 2 + 1* histRange.Cells(j + 2, 37) = x2(j)S histRange.Cells(j + 2, 39) = Y2(j) * (noobs1 / noobs2) '* (Width1 / Width2) Next j? If binleft(Nobins2) > maxbin Then maxbin = binleft(Nobins2)' Figure out chart scaling'Dim tickwidth As SingleDim nbs As LongIf Nobins1 > Nobins2 Then nbs = Nobins1Else nbs = Nobins2End If'tickwidth = Width1+'If nbs > 10 Then tickwidth = tickwidth * 2' Put in the chart'Time(7) = EndTimer 'StartTimer Charts.Add5 ActiveChart.ChartType = xlXYScatterLinesNoMarkers ActiveChart.SetSourceData Source:=Range(histRange.Cells(1, 37), histRange.Cells(nbs * 2 + 3, 39)), PlotBy' :=xlColumnsH ActiveChart.Location Where:=xlLocationAsObject, Name:=histsheet.Namee'testname = "=SERIES(,'" & histsheet.Name & "'!R1C" & 27 + number * 10 & ":R"' & Nobins1 * 2 + 2 & "C" & 27 + number * 10 & ", '" & histsheet.Name &' "'!R1C" & 28 + number * 10 & ":R" & Nobins1 * 2 + 2 & "C" & 28 + number * 10 & ",1)"d'testname2 = "=SERIES(,'" & histsheet.Name & "'!R1C" & 29 + number * 10 & ":R"' & Nobins2 * 2 + 2 & "C" & 29 + number * 10 & ", '" & histsheet.Name &' "'!R1C" & 30 + number * 10 & ":R" & Nobins2 * 2 + 2 & "C" & 30 + number * 10 & ",1)"'ActiveChart.Activate7'ActiveChart.SeriesCollection(1).FormulaR1C1 = testname8'ActiveChart.SeriesCollection(2).FormulaR1C1 = testname2 ActiveChart.ChartArea.Select% With ActiveChart.Axes(xlCategory)" .HasMajorGridlines = False" .HasMinorGridlines = False End With" With ActiveChart.Axes(xlValue)" .HasMajorGridlines = False" .HasMinorGridlines = False End With! ActiveChart.HasLegend = False ActiveChart.PlotArea.Select* Selection.Interior.ColorIndex = xlNone ActiveChart.PlotArea.Select Selection.ClearFormats$ ActiveChart.Axes(xlValue).Delete With ActiveChart .HasTitle = TrueS .ChartTitle.Characters.Text = "Histogram of " & myname1 & " And " & myname2 End With* ActiveChart.SeriesCollection(1).Select If Nobins2 < 30 Then With Selection.Border .ColorIndex = 57 .Weight = xlThin .LineStyle = xlDot End With End If) With ActiveChart.Axes(xlCategory)! .MinimumScale = overallxx .MaximumScale = maxbin '.MajorUnit = tickwidth End With ActiveChart.HasLegend = True* 'ActiveChart.Legend.Position = xlRight+ 'ActiveChart.SeriesCollection(2).Select Dim teststring As String>'teststring = Left(ActiveChart.SeriesCollection(1).Formula, 7)'MsgBox teststring5'ActiveChart.SeriesCollection(1).Formula = teststring$Dim rowH As Variant, colW As Variant!leftC = histRange.Columns(4).LefttopC = histRange.Rows(1).Top.rowH = histRange.Rows(15).Top '.RowHeight * 14,colW = histRange.Columns(12).Left 'Width * 6Ahistsheet.ChartObjects(histsheet.ChartObjects.Count).Left = leftC?histsheet.ChartObjects(histsheet.ChartObjects.Count).Top = topCIhistsheet.ChartObjects(histsheet.ChartObjects.Count).Height = rowH - topCIhistsheet.ChartObjects(histsheet.ChartObjects.Count).width = colW - leftChistRange.Cells(1, 1).ShowhistRange.Cells(1, 1).Activate"Dim rowsub As Long, colsub As LongIf histRange.row = 1 Then rowsub = 0Else rowsub = 1End IfIf histRange.Column = 1 Then colsub = 0Else colsub = 1End If With ActiveWindow3 .ScrollRow = histRange.row - rowsub8 .ScrollColumn = histRange.Column - colsub End WithhistRange.Cells(1, 1).SelectU'Put down number of bins used for the original (default) histogram and latest versionIf Cells(1, 5).Value = "" Then% 'put down Original Number of Bins histRange.Cells(1, 5) = nbs# 'Put down Latest Number of bins histRange.Cells(1, 4) = nbsEnd If'Time(8) = EndTimer'For j = 1 To 8)' histRange.Cells(14 + j, 1) = Time(j)'Next jEnd SubHY Usage Call MakeBins(binleft(), bincount(), values(), noobs, Nobins, Width, xx, x(), y())]H` +\ X <$\  X X+\ X Put data into bins Z F'X X$\ Z$Db X <G\Fj X 'X \ X$^ X+^ Z Get coordinates for histogram$\+h+j X < X 'Z X $\ Z+h X$^ Z+j X$\ Z +h X$^ Z +j X <$\ < +h < +jox]'h h  h 'hX h$` 'o8 h$b$@$b'`Change me back!ip]]0'  0.' X  0' Xkh (foP ] ]8 h P%  h P%$|. '< T Add Adkd p  '<  A^ T h P%  h P%$|. Ad h P% h P%$|.  Add  AdkkoX]]](]@]X]p] j j'j'xd'xk $`'n $` n 'p?$`'r@$`'@$`'t!@$`'v n' r p  p t p v p  'd 'kd @'kd 'kk  j 'l l x'l xG l  'ljo`XAttribute VB_Name = "Histogram" 0 ' 8422 October 2002&Printed 7/7/04"Modifi$to include NewLimits routine^Option Explicit Pub Nobins As` LongWhvaDeclar@e Func:timeGetT Lib "winmm.dll" ()ADim lngStar-!.Sub r(f)7= 2End  E? C   -OBg ETest3MsgBox :Maker1Var(valu$es{Doe, noobs, width, Cer, minS axh~s@heet, RangViewTablAll3bum@H Written by Frank HowlandE \i`j@{lef=C.@ @' The A @coun cCMin Mdaxmy<Work XIQychoiceK$col\@Kg SingleavarnSE7lcomp#vmaxLa~rCH.tAwx '!1C topW n t 4iD labe`ls--t`Hf}may be unnecessar@y if p}w!/GXb(1 To 2w Call Re #evezL (e@RA%%(= DQprecis,statm"f5= -wcg\ xK, xu 4xdowjR!$yy+ !abs I.mybo4`. (gxWC|dxxIf#~0ݡhnc,`1`lsQ D aIf{q(xx DriveFormat g( , Ǝ;1 0Rea)BoȠa<BL X(Bh2 *+ QI y4¥H 4yb3 K{C tn?cNext iAHO$$7, 3) 18", 4)T>PutIn@((s(3)) `"5,>eGc )j$)'2  jp 7"X(jSs(8y j[tick{|G=SX5 > 50^ AB' TitҁChP!d AveR.RTypxlXYScTerLpsNoMtarСsi0SourceData :=,BS,$ * 12@8) PlotBy _7:=xlF1.Lo yWhereAsO0bjec0:=b.!WtMifp=SERIES(,'@{A1B'!R1C2z7!n"KD:R" &ead , e~"q3"C",1)R'riesl!(1).3mula`14o"%Area.SeAWith )Axp@0goryH5.HasMajorGridlA)9FaƆ,2in?a?!q1.Vϟ_T C` Lege=~ )0cP."IiorNor IndexxlxNon |ClearAat?6 .Dtqe With Active`Chart.HasTitle = Trud 6.acters.TextV"Histogram of " & varnamaEnd .Axes(xlCategory)MinimumHScaxx ax binlefPt(No sD'MajorUnitickw0idth$M'DPim cN\ As Strin@g ' * Need toeck for others wd   )= " '& VarlabeXl(1W.A=-BCount 9 numb<. objec0ts an just assignlasaprowH7iant, colW, ARCvhuRange.Columns(3).LY topKRows2@.Top =& C5) '.Height * 14 B! 10 'W#Am 6 shHeet¢tO?(ϓ.MD= 66EA>4<= G-pC@#BN-5lell@d`, 1).– " @sub>Longb@A@Ifh7 1 Thenf = 0 Els|1@QIf :l ?p h zhWi0ndow( .Scroll MAC" -/dD-e-1/Selt+'Phut nx us|original (default)1[C|l`9@|vi6o2,C=lVa$lu""6'pEO NBins!h' @(cL  4) &AD"aSubA Make$r2(vs1()WDoublLe, s2noobs1, |2,Bmin max"A" b,'a, AllAf E`ViewTaCCCallRev%, picn` w"wMIN@ueAMAXga` 1)' 21 Oct 2002fIbis 0revi(% I)dmethodology from HI1 C1!,setts limi`ioCh ,!Hi5H'j/ %Q[9>'- &cQr#haxm.3kmyR!Wo|rkbf o [x-' Yxj/ 0 + choice0XO'rS@l_ 32E, 1 ' keep tra $s"purpose$Hxxb3, xxb0,!"IRoaV' F s ׂg2iMS [`yv'@MsgBox'R.Addres`i2 < iGD=A DQcY >TbQOcWReeveLAs(J⶷Y!={25(2PMSame] excep0dac"two seri(es Ps!plzo$i&r}ar"r10rFd3vNewLX(dWqp xAhC<(Cho?yrgaѐcs in !(i>~23!@F0;c3=O= 0  1#)-Xth    1r|gs us parameters for the first histogp If xx1 <2 Then 8choice = 1:Boverallxx6a`ElseDisubInt(@(xx2 -j) / ;Width)/ R/A* /.1>[--"End Ixf [xx2Dx1x2xxQxD>Pc@k0y@valrangpe > IC(max@ g=AɧwBNext ic$(4) /~Fa!mF= s!17a3 187-FZ5!V!,'cPutInBox( %eO{22, 24E0*E0 II@' @ down labelsc}j"aDO370j!Var2(jsRj;32! s(j37@q8PCU1U' resP/3secoa#Limits(f@0L)pT gbs u kgogogheg)!qogbge-g2 #ESx2-gA/gY1 )]qOgqbC @g"gp/g g2!j0nZ1q, 6Q+E5Z_Iq6)).WrapT1QV@o  ' w`hy is`@cr\ 4?Q S mSnS4S_S|'1S ` ~T8K{{in/{wozoz($ww/!4,H wwqxgex1 Ox3QLx 20rZD{{BPax{ O)O)O)k|3 z}sdu)IQ7?K5@.>Ի=k1ug1^Eqr For i = 1 To Nobins2 histRange.Cells(i + 18, 6)cou nt(i)bNext i End If2jd0 * ^2!p mj2, 37mx2(jg+9+Y+_(noobs1 / 2) '* (Width2 ^jFIf Anleft()@ > max PThen= ' Figure out chart scaling Dim tickwA As S le  nbs LoA=1=B=Q=1ls" 'mynaXme1 1X8kDA 2 9 CA6s.AddActiveB.BType@xlXYScatterLinesNoM@arkers SetSource Data :=(,7), KA?Õ3@59)PlotBy _H:=xlColHumnP!Lo@+ion Where EAsObje ct, N@R:=sheet.'testY>"=SERIES(,'" &* "'!R1C27number10:R"I,&Ez2, @H8X0,1)"[G  9  2   30 O1 `batr'@SeriesOlC`IM(1).mulaBt(*2$brAre0a.SeaWith Axes(cgoryf.HasMaj@orGride2s\FafinvAValu~e??+)Lege= I!N'(7.Inior.`:orIndex@#xlNuD"2[ac s.Ta|= "Hogram Xof J%d&A7'_%aO/)(n2 < 5Av'  Border ol57@WeightbThiniSty"xlDot+ s11}.4.Minimumpoverallxx.Max7)#' 8Uni  Y'Y.G zIS0.Posit(RQ?L9LHbpstr;ASFr= LA "VN, 7`A'MsgBox QRcRVorV@ icrowH! @Varian}colWA ѠC#(4).AQ topRows]Top : b=#5). '.HS** 14 R3E!(1 'q6 LjB=srciJpc  /Ž/c% = A 4= -8 &sC= - d  `wShowh)G"|- sub!L ,qQ`Lc1= 0Vq`UF@VGpJpWind.Scroll( -1@ 4v g$-J%E>P n  is used$ f@thriginal (default)6Clalst Ws N ` 8ru`""'pONú0BC q 5)'& LSW _`(4VgTime(8`q` 8a 4 j, 1) = Time(j) 'Next j End@ Sub ' Above is the new version ofX HistogramMaker2Var Belowjoldjd4(values1() As Do@uble, 2 noobs1, 2, Widthmin7max hgsheet, Rang7AllLong.ViewTaGnumberA'CallqReve_, pgicn[.wSbwMINU, MAX  `U1)' 21 Oct 2002^' InwxreviseGk I useB~methodology from H I}1|' for setting limits $ˆ Dim isUjbinlefJtCzSle@'l Tscoun MinGA Max'9(NoLmySAWorkBF`QAw[#xJ*YxI (BLc hoiceolQrdAC3'R2, 1 ' keep trackGcalGpurposeI;xx%, xx @{  }-Syname Str, mBB C) ult,&aSC , top bIÐ'`jlabel(1 pTo 2bNr› x[O"aBC¢8( ' FiĄ  a!/!|22ri!a7'Start B v`@F`1MsgBox.Addres@If 2 <$hen a   >dC Re`DeveL2s(3g!"I= '7k2 f2a ' S`P as except adjustto a"cBtwori esAplot n d*@Q&Irrum= H?6qEgivA 8us pae0 sBl fi1Y0 !//(y-o  2em5 kbI01 9'qPvs  l'% @rBI&r R/> a (#9 SQqup$ #vϰZq!dxx0GDr0Forma¿( E, G"D="/DA%. . +R>'uhDPARes0ou3#@\*z0"2 *V+T*C1Bins( ), TuDI,x overallxx, x1(), Y() ''Time(3)@ = End0rATStart4Dim myWidth As Double, maxw&yboxRpangeRIf ViewTa7hTrue T(hen For i1 To Nobins1=Abs(left(i)) < 1 * 1@0 ^ -6J I0 'avoid rounding pro>m+histP.Cells(i + 18, 4' - 1) @& " to&4%5%cC]Set AZ(J, 偕*.Columns.AutoFitHs= z _E >}oG= Next iD!(4)I@AllLongs@% HZJ!#Int( /幢 )$6C)"V)4ReP?"*ÖB`x2(B2`G+ 2)'eY ' (MakeBf'`"ue!(noob,#2ߠ+@ӎl+"No. Ob`s. in&n1 #q6`w/K.a53 ).WrapT` .@" >uw WrWsW,4WۡQFi+31*U M ~~inp0d1O}!O}6_z_z i'! zzzgezem{D{Sr/"\%~?o~ҡbRElseX'''R}[6' P}D/eU*N( ?3<Ii681682=82RxoO O {*/sp̱/'A &fi0'Ť ̈eψ+ˈ2OC9ˆk k(c1 u3d) '* zAc{!!@HV)?Dձ@J}@' Figure o ut ch s8calztickSlQ3xnbsu%s%=h71= b1ف=>r* !Prr!Bo!!!Cqdd@Act`bB.RTypex lXYScerLinesNoMXark.FSourceData :=!R]/w( @_3p9) PlotBy _ :=xl#DQ.Lo ion WhereAsObject, NamGsheet. 'testn"=SERIES(,'"'!R1C" & 27 + number * 10":R" _  ' & Nobins12F2z, 'histsheet`.Nameb ":'8s1,1)"'testnn2 = "=SERIES(,A9A2y309ActiveChart.ate SeriesColle@ on(1).Formutla1@OER^2=U2B%Ar`ea.SeWith Axe s(xlC.gory) .HasMajorGridlines@+pFals9 in End A Value(LCI>@7Lege'= I5PlotQCTion.Intwor.xorIndexHxlN onIClearCats%d5C%.D:M0:A%4Title T\ru7D.Aacs.Text "Hogra m of !myA~1 A'gEP'-1ajSIf2 < nThenBG/Border'b057WeighaxlThi L\StyB%xlDot,IfH0.kMinimumSca overallxx .Mabximax'# sUniatickwidth$($I_B'ic.Posit]`BxlR!( ;!;Dim string As >S" @"D= Left(IG, 7'MsgBoxH b@G@rowHVariant, colW#5lCaRange!umns0(4). 0toBp+Rows`Top= 5). '.H+Ѓ4 /"11 'W =pt6cR?Obrjis(oa unt ` ??5 = ).t= 2-I 2 -> &!Dell , P{Sho~w#&#sub"Long#?O ` 1 GhO 1= 0Ewv1qXH @Ov 1Q4MWind.Scrpp*`{ - \D w$-17MH AP'Put ` nm used for the original (defauXlt)83paplst ZsPp=0C%:y""i'pONs=PBྀao 5)nbՀg Lw  4wk'Time(8?AuU j )o 8O 14 j2jXNAjPSub  Makeq(@ 8()q2Double, @coGS3vs{noobs, 4, =, xxh, Xy Usage Cw%), , Ux(@PY! QA@i?j0Q!ii+P^i ' r/ata into$ "Do WhiP<=?1 B0 GoTopVaveloop:i#@Ga1L `S!+ &' Get`C5<X(5 0ycWi -aX(jiس - 1) y(j) = bincount(iX(j +|lef xt< |Next iX(Nos *\ 2 sy(0 End Sub  FindPrecision(wid`th, pJDim X As Single X1 While> N X / 14We0nd % -Log10(X)[Ctatic FunctB )//(10#) 'Change me back!,&sormatSuDmS5s(sRufxtry iLong= "0" IfK > 0 ThenC" .@ For i@31 To { &EoIf 1.Number8XA@Drive t6{, All8, valrFhistIwhichseriesėEGwGA*F'AN9Set = (F.Cells(6, 1@I, 12O 'd@B c9) <TruenCall Kэ0AElsbߟfE8I%0 i"f v!1181s(1a?)CDH7CA NewLimits(xmin,,Adrt@LAilY@lDoubareml a *b C d ne:gAL" Ia <㊛B= -C{k%cA = ]b)cA&=_- C au1.75`b2.2C4.d8#)= 10 ^ `a'@bTACC-$d/*a s* s1K(U]5LtO 2.(5+ngsI.Tjrt *b#/. 3"s* 0#bu#-ru71S-Jn5aBt`5 o`oX o`tX xfL5oXkh%(% $ ` C5_(%(h%l8Bl,i%(%l8B $ QT6xl,d+lxi%(h"%lxlpk %l8D xf l,lpt td]*(%%ltih%ltF %l8D tf)tl,d+lti%(h%%ltlLk %l8D+lti%(h&%ltlHk %l8D tf|0ok*s4((l84M@l@0M@l 5n4oq0l0pl0l#l0D#l0@1@DMh@M@0M@lllp $Dc]3 +(%(h%1*F%l8D5+(%(h%1*F%l8D5`(%(h%l8B(%(%l8Bc% $ ,6 l0l, _(%(h%l8Bl0i%(%l8B $  QT6l,xl0d|{ lxlp ϳE lxlpUlxi%(h%lxlp#H*#Dlxlp#@*F%l8D2HD@5glxi%(h%l8Blxi%(%l8B $ Q6$a 5aBt`5 o`oXL o`tX%lxi%(h%( %l8D xf| 5oXkh%(% $ ` C5 _(%(h%l8Bl,i%(%l8B $ QT6"lTM @ l= Txl0dt +lxi%(h%lxlli %l8D xftK l,l0 l0xl,dl %lxi%(h%( %l8D xfl xl0dd +lxi%(h%lxlli %l8D xfd tl0d\ +lti%(h%%ltlDk %l8D?lti0%('%ltl@kh%l8D tf\= l0lpo  l0lpt l,l0 l,qX l0qX7T '0%'h%'%'% $ \  ()T K $ ,  (%(h%%l8BlXi%('%l8B $ %Q[PT $ , T l)PT69l4AT $ ,  )T52T  $ ,  T)T7T % $ ,  QTLf%Lf%LcL7T % $ ,  QTHf%Hf%HcH"  $ ,  h2T  $ ,  T)T0%  $ WC52T  $ ,  T)T!  $ >T % $ ,  T)T $ , QD D pYl*#H2*#Dl*F% D a[TT,2HD)T6cD6T (% $ ,  T&)Tl0;*  $ W344q0(9%l0C%l0C4%l0C5 q07T % $ ,  QT,ok%,o k%,c,"  $ ,  h$(%l8>ABt6$(%l8>ABt6 (%l8>A5 ( %l8>A52ok0%l4=A %l4>C62ok0%l4=A %l4>C69ok%l4=A %l4>C!69ok%l4=A %l4>C"6$(%(h%l8>65$(%(h%l8>#5l8A$(]35 q ql8A%(]35 q q $ D Q(l8A$li"ih%,5(l8A%li"ih%,5c$(%(h%l8>&5D(%(h% $ X A': (]36(%(h%lXi %l8D(%(h%lXi %l8DDrU~|  7Uq  VR1ViV!.KV-V WYWWW;XaXXX Y1YQYqYYaYYZAZYZTC,I q ! ZZZi!iiiiQ[![ip0+'''<:l/N\\ 06\<0$ \< YM` C@ *sD(]3e (b  Bt|M@ll   ok*sD*(l(DM@l0M@l 5pl%T%P.PTM@lM@ll lp $*(%(|%l(>A8Bth68,c]3xd0;lxlp ϳ lxlp(%(|%:H%l(DUlxi%(|%lxlp# *#lxlp#*F%l(D2 5+lxi%(|%lxlliH%l(Dglxi%(|%l(Blxi %(%l(B88 $ Qx68$xa 5xaBtp5 opoh1opth xf0a(%(|%l(Bi %(%l(B88 $ Q68"lM @ l= 5ohk|%(% $ ` C5!tdv+lti%(|%%ltlTkH%l(D+lti%(|&%ltlPkH%l(D tf *s(*s7 'X%'|%'%'% $ \  () K $ ,  (%(|%%l(Bi %(&%l(B88 $ %Q[ $ ,  l)689l$A $ ,  )52  $ ,  )7 % $ ,  Qf%f%c7 % $ ,  Qf%f%c"  $ ,  h2  $ ,  )0%  $ WC52  $ ,  )!  $ > % $ ,  ) $ , Q  pDl@*F8%  a[,)68c7 % $ ,  Qok%lpk%c$(%l(>A8Bt68$(%l(>A8Bt68 (%l(>A85 ( %l(>A8|52okX%l$=A8 %l$>lC68l2okX%l$=A8 %l$>lC68l9ok%l$=8Al %l$>\C!68l\9|ok%l$=8Al %l$>\C"68l\$(%(|%l(>8#58l(A$(]35E qXQ  qXl(A%(]35y qT  qT $ D QP(l(A$lXi8"i|%P,5(l(A%lTi8"i|%P,5cP$(%(|%l(>8&58D(%(|% $ X A8':H(]368 !(%(|%iH%l(D!(%(|%iH%l(D0, Pl X|x$@ ps\torampPt:Tno4 8l\ $Bt,$g- ,Bt (Bt0(tX 0BtY|M` CC(]3 (b (Bt$$M@ll$   (]3 (b 0BtM@l l,   t< Bt q<T  Bt q<$(3  Bt q<,03 Bt q< o$ol<o$too$oqxolxot oo$ ootol</otmo$ooqxo$lxot oom oot o n4oott(ok*s4((l84M@l<,M@l 5n4oq,l,pl,l#l,L#l,H1HLMh@M@,M@ll lp $Dc]3xl,dL*lxlp ϳ lxlpUlxi%(h%lxlp#H*#Dlxlp#@*F%l8D2HD@5+lxi%(h%lxlli %l8Dglxi%(h%l8Blxi%(%l8B $ Q6$a LHD,4@lXT(pLDH4 HD@TP0$dB xd"d\e/ k, Llxid<Blx 5 xf\,td"d qxlx ltlxid]L3lxqxlxlx tf} (,xd"d lxqtlx lt(lxlt,lx lt(lxlt, xf ,/d" ,(L<("(5&L(d<(,",58($ <\sxnxjh] Xt0 nx sx (xMh@H )H8(X(b5H T\$ H8(h4,$@ tD\B9 oDkLl 84(l h,CxT(d]tS-Cxtd"d?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqtuvwx{|}~)1:36]]Bk% tCF~iv߫:%AcTRNdBa+D_@ZxD_@ZBk% tCF~ivMESPSSS(| f>" LLLLLPLL  "LLL<<<<<<<<<<<<<<<<<<<<<<<<<0{14ABDFF4-B63A-4125-9C9E-B18DF963AAEC}{12BE0454-52B7-4ED3-9664-D7CFDB42612B}h$ 60`JNN'`XHy`Dlep `8`4tiPa`0  `kqqu xte S%`tn_Cl`r te S`lck()`hank `d``ins`\s`XualC`T" `Plbtn`8L DhHk()2  D) -?Pr`<etTi`4) As`,gSta`$Su`Xp ln`ZTime b% 0% P () -% (`!``s on`Htogr xrkshBin Adju `stog`8@outp`0<a ne`8( `@`h ge `8k  &` 8k  ( `k EE xpnly  XX t X `l(`dit`\am`T$`*Lata`,D`.<`04 `2,!`4( `@$` (`6'`X(NZ`Z! 8 Hn ro 0`Jnly `L X`:@$`<Xst (%  X% Ph numb%`>$|`@ +`B`" s8 `$ !`D nly `F`H $ J % `L `RP $ O@ P % Pp %`nX *`p us c`R m of`T one `VX `X `Z _ tP **8 `\( `^x`` `b B@Z `lphine d me(1% `~ Lrlab` D ' ` <ing    `8!|kC ( `!Hk G h `#|kQ  `#|+W  `tk  \ %@ %( h 0%z%"ps]@x ng w@t ramhPPP `@|@ @ @ @ @ @0 @` @Ht @d @xT @D @4 @0 p@, @8( (P@`$ x8@  ``@ @ @  8@H  ` @p H"@ p"p' -@ z@ 8  8 P h p x X `Ph" "@|@ @xl @0\ @L @`< @H, @x @ @ @ @8 dfh@ @ @  @8 @ @x PQ@ xQ@ R@ RV(xW@8 Pn@|O 8n@xx @t 8x@p @l 0nrtvxz|@@` X@\ h@@@X @T @8 @h4 @, `zB @P @( @ h@ @  @  @@ @X @p @ |(X"@8x @h @X @H @8 ( @ @ @  @ @ @ @ X ( @ @ @| Pl @\ L @@ < , '@( 0'X1h$ 4  4>( (x "RCn Dn @x @h VGn @X BJn @H +Kn @8 Fn "Hn YFn gEn n @x @!h @ !X iLn @H Hn @8 Dn !z|On Qn """"z|n Fn Cn n @x @Hn @"h In @X @H #z|En GFn n H  $HWJ$*\Rffff*154a570539*\R1*#220*\R1*#336<@DH LP T X \ `dhlp t x| ;<P'n @ H 2P $ $    (    &8 ` 6x ( B   (8 (` (  8 F @ ` "x   .  "   @03p`hpx  D  ZP0Y $I;8 X(hx  H   Z (8@HIPMhI!!  (   T8 X$ex  &g$e   &g @  H P X  Tp  $e    &g  $e  @  &gP x  2 & > > " &@ P *` , $    "     L@ 8  $ >0 @p $ " 6J88  :( H` &p 8 @06@x@ .  @  Xx  "  0 6@ xW   > " &@f3P   P 0 8@ "H 6X  2 .   @ <H   6 4(  < *X > ,,     $  0 &8(` *p  B+  H$ X ( |E 8@HX`h x 2 &(  L+ hp x N+     (0 H "%XE( @ "%HEp( @ "%HEp0 H PX *` &   J+   ( J+8    (8  8  "%8 E` !  ! "%(!EP!! " "%"E@"" ####! #@# 6H# L# # # ## $$($ $2 ($"-`$6$ %8% "@%2h%% *% >% * & P&,`&(3&&&& &+& & & *?'H@'' ( (  (  ( (( :@((  2( ,;(( ( () :) X) p) *x)) ))))) ) ) >* ,@*p*>x* ,**** + + (+8+ @+H+ P+ X+ h+ Bp+ + +6?+ 6, ,,, ,,, Tc-`-,8p- - - - -- -- - -. .(.TK@..60..+..//60 /+X/p/x/ /<0/+////<00+P0h0p0 (x0 80 0/0 1 $1 @1 "X1 "1 !1"1 ,1  1*2< 2`2 h2 D2 ,2 "3 (3 (@3 6h3 &3 3 3  "3 .3  ( 4 04 *@4p4 x4 (444 "4 64  (5 5 * 5P5 X5 (h55 5"555555556666 606868X6@6467 7(787X7`7  "h7 &x7 B7 67 8 (8 >88 x888888 8 8 08( 9 09 6P9&9x39:: F : h: (:4: : : : : : ; ";@;<+P;;; ;>+;;; (< (< 6H< <<< -< < < < = =*3 =P>X> `> h> (>>> >&> ? F? X? h? ,p??  .? $??!@$5@@@P@"<`@ @ Z@ "A (A 0A @AHA XA  `ApA AA A A A A A  AA ABB  B B0B L8B@B B B2B "B $C0x(C XC hCxCC C 6C 6C=CCD8 D(68D$6`D.6D6D6D6D&6E68E&6XE6E0GE ,E &F:(F  HF!hFFF $F $F F%G  G  @G :HGG GGGGGH49H @HPHpHH HHHHH ^H @I 6XI 8I<I8I8I8I8J8(J8@J8XJ8pJ 6J JJJ$4J K 4(Kh>@K K,>KDKB0L">xLL 0L L $L @M PM  2XM jM N $N  !0N PN XN$pN N %N ,N 6N :(O  hO pO >O  O OOPP(P490P hP xP P P PP PP Q ^Q  =hQ 8Q 8Q <Q 8Q 8Q 8R 8 R 88R 8PR 8hR 8R RR R$4R R FSHS6PS "S>S S"S!S S  LS0@T  "`TpT "xT TT T "T T TT"U"U!U  (U  8U HUXU"`U hU xUU "U U *U"U $U HV LHV NV XV @W/XW VhW W 2XX %X YY Y Yx: ******** HistogramGenerator MultiPage1 Form *********+ There are two pages in this multipart formx Input = MultiPage1.InputPage Output = MultiPage1.Outputpg! Subroutines in this forms module Input page by Ho Private Sub InputOKbtn_Click()r( Output pageimer =/ Private Sub PutOutputOnCurrentSheetbtn_Click() " Private Sub MakeNewPlybtn_Click()< Private Sub OutputOKbtn_Click() (this is the main routine) bins Cancel buttons" ManualCancelbtn_Click()" OutputCancelbtn_Click()! InputCancelbtn_Click() andiable 2 InputDatabtn_Click() -- To be deleted??Private Declare Function timeGetTime Lib "winmm.dll" () As LongJDim lngStartTime As LongSub StartTimer()lngStartTime = timeGetTime()Width,End SubFunction EndTimer()0'EndTimer = timeGetTime() - lngStartTime End Function zB@|8$! $!  "!~%Bin Adjustment is only available for histograms on a separate worksheet. To use the Bin Adjust feature, recreate your histogram, making sure to output the histogram to a new worksheet. No Bin Adjustment PossibleA@@|k]@]X' get the data$! it's a one var histogram$! $' load data $|!% X $|!load only non-missing X $|%! $  ' M X $|# +k( dit's a two var histogram$! $' load data]]] $|!!' $|!!   $|!!'kX  ('' $|!! $|!! data in rows B@ X $|!!load only non-missings St X $|%! $ "=S  'st X $|% +0 k  X $|%! $numb  '"  X $|% + +kddata in columns8 X $|!!load only non-missing).Fo X $|%! $  ' X $|% + k X $|%! $(  ' X $|% +kxk*IF to catch row versus column organizationram ofkIF to catch one versus two var $! '$! ' _ G_'j-****  !(  !( ?  !(r ot  !(gr  !(be B@Zam" '&o80 This is the main routine]pDim Time(1 To 2) As Longrt] Dimension statementsstEDim Varlabel(1 To 2) As String ' currently only allowing 2 variables! Dim mySelXRange As Range2 This range contains the data that's been selected]Is there a label?] The number of labels ]/Number of rows in selection if it isn't a block]2Number of columns in selection if it isn't a block]Number of observations'] Number of variablesP!]8(Total number of values, including labels]P;Label for continuous vs. discrete *** replace with Boolean?lt) hi]h*=1 if labels are present, for columns case What about the rows case?]+This is the actual number of values in listest Nu]The actual values go here] ]8P]hvariables in loops]/#for adding worksheet with histogram]1Range where the data will be put if on same sheet]# These are variable names]0(check for problem with first observation]H]`x.,count the number of non-missing observations( These will become publicnovals 1 and 2. Diagnostic Testing]]1 distinguishes between column data and block dataInitialize VarlabelVar1+Var2+ Get data off the form 1) Continuous or discrete? Not currently implemented) **** the program should figure this out.0 count the number of unique values after sorting2) How many variables? !  ! 'd8 'k( 7 3) Check to see if anything has been put in Var1refedt If not go back to form ! <You haven't selected a range for the data. Please try again.  Data ProblemA@@@ k8 ] ! 'I This material to be used for checking that Var1refedt is indeed a Range] !'/ This won't work if we go to a different sheet.Dim checkref As Long+checkref = InStr(1, checkstring, sheetname)](checkdollar = InStr(1, checkstring, "$")graphRange = checkstring5 **** error trapping 1004 is not a Range object ****0 Get the data in to mySelXRange -- crucial step! ! $|. ! !' A6 *** Color the range--should this be deleted or moved?$mySelXRange.Interior.ColorIndex = 158 4) Get number of X variables, NumXVar, NumRows, NumCols !!' !!'  '' 5) Is there a label? ! ' 6) Are we dealing with a block? ! # First check on number of variables 8Blocks can contain only one variable. Please try again.A@@Fk 'B We're dealing with a block which by definition has just one label Skip over the label'$+$$.The variable label you've chosen is a number: $. Please try again.  Label Problem$@'k  'kd  ' Data isn't in block so+ Is the data organized by columns? If yes, 7Col) Test if numcols > numvars !    BYou've selected more columns than there are variables. Try again.A@@k   CYou've selected fewer columns than there are variables. Try again.A@@ k  '  '**** X  X$ X+ X $$[The variable label you've chosen is a number. Do you really want the variable label to be $? Potential Label Problem$@'  Gjk $$rThe variable label for the first variable you've chosen is a number. Do you really want the variable label to be $? Potential Label Problem$@'  Gjk $$sThe variable label you've chosen for the second variable is a number. Do you really want the variable label to be $? Potential Label Problem$@'  Gjkkd#If we're here, the data is in rows. 7Row) Test if NumRows > numvars   ?You've selected more rows than there are variables. Try again.A@@k   @You've selected fewer rows than there are variables. Try again.A@@pkh  ' X  X   $ X+ X  '# Just one because nobs is not total $$[The variable label you've chosen is a number. Do you really want the variable label to be $? Potential Label Problem$@'  Gjk $$aThe first variable label you've chosen is a number. Do you really want the variable label to be $? Potential Label Problem$@'  Gjk $$bThe second variable label you've chosen is a number. Do you really want the variable label to be $? Potential Label Problem$@'  Gjkkkk DH]P/ 8) Check for non-numeric data--make it missingE note that blanks pass the IsNumeric test, but are flagged as IsEmpty StartTimer 'd'k ! ''$There's just one variable in a block$$ pThe first value is non-numeric and will be treated as a missing value. Do you wish to include a label instead?  Data Problem$@'  Gjk Check for non-numeric dataF $Do we need this statement only once?  'X#For i = nolabels + 1 To totalnovals X    or should this be totalnovals?# Read the data in if it's not blank  ' X$ +D X$$G  'j P X 'X8Time(1) = EndTimer ! e' Z  Z$! $ The first value in column Za is non-numeric and will be treated as a missing value. Do you wish to include a label instead?   Data Problem$@'  GjkF''X  G'Xj X   (For i = nolabels + 1 To nobs  '  X Z$  Z+D X Z$$G  'jF X  X 'X4 don't need to reset countobs since we're reading in the next valued$ reset countobs and exit the routine  ' Fd( Fkk  F++/This sends us back to setting values() equal to&the next element in the selected RangedF))/This sends us back to setting values() equal to&the next element in the selected Rangek X 'X Time(1) = EndTimer Z 'd 'k Zd< Data is in rows and needs to be examined in a different way Z ' Z   $$ pThe first value is non-numeric and will be treated as a missing value. Do you wish to include a label instead?  Data Problem$@'  Gjk8]h'  G'j X   X Z   $$ X Z   $$  ' X Z   $  Z+DkX X Z 'd( 'k ZTime(1) = EndTimerk   'There are no numeric values for either $ or $A@@d` There are no numeric values for $A@@k  Try again.A@@Fk   There are no numeric values for $A@@ Try again.A@@Fk %There is only one numeric values for $A@@ Try again.A@@Fk  %There is only one numeric values for $A@@ Try again.A@@Fk" 9) Get the data out of the range.1actualnovals = (totalnovals - nolabels) / numvars StartTimer D    A ACall storeRange(mygraphRange)Time(2) = EndTimerMsgBox "Time(1) =" & Time(1)MsgBox "Time(2) =" & Time(2) !( !(%MultiPage1.ManualPage.Visible = False z!(   !(2Go here if there is no data in the range selectiono  Output Page Routines> Two routines involve enabling the text info and refedit boxes& The main routine does the output work Where should the output go? The routines are" Private Sub MakeNewPlybtn_Click()/ Private Sub PutOutputOnCurrentSheetbtn_Click() This information is fed to the **** routine( The default is the new worksheet (ply)  "($#WorksheetNametxtbox.Enabled = Falsed "($"WorksheetNametxtbox.Enabled = TruekH o@ / Default is put output into new worksheet (ply)  "($#WorksheetNametxtbox.Enabled = Falsed "($"WorksheetNametxtbox.Enabled = Truekh o` ]@]x]]](]@X]p]]]]]]]Ph]+#for adding worksheet with histogram]1Range where the data will be put if on same sheet] %keep track of number of unique values](  ditto]@ ]X p ]    ] ] "(NHere's what needs to be checked; HistoSelectsDisplaybtn selected versus ManualAppearancebtn/**** manual appearance not yet implemented ****]8 .N7Since the ply was just put in this is the active sheet.]X ]x  ]   ] ] ]  Get the labels A* 10) Check to see if new ply is called for !  put data on current sheet0 check to see if anything is in the ref edit box "! NYou haven't selected a range where you wish to put the data. Please try again.  Data ProblemA@@k? Again we need to check if OutpurRangerefedt is indeed a Range via error trapping ****" compute range where data is to go "! $|.P P!'n P!'P'T 'V n V 'X  T 'Z check for room on the sheet Z 1Not enough rows to display histogram. Try again.A@@hk` X 4Not enough columns to display histogram. Try again.A@@k  n$ Z X$$|.PMsgBox histRange.Address0 Check to see if anything already occupies range'R X T Z V X Z$P$ R 'Rk Z X R Putting the histogram where you suggested will cause overwriting of existing data. Even though the area you chose may appear empty, there are cells with data to the far right that cannot be destroyed. Please try again, putting the results BELOW your data.  Output ErrorA@@kd Put in new ply! **** stopped here 8/23/2002 ****]X ]p If publicnumvars = 1 Then Histogram'\" & Varlabel(1)Else@sheetstring = "HistogramFor" & Varlabel(1) & "And" & Varlabel(2)End If'^& check to see if any sheets named this]  ' Need to know how many sheets there are d!'b bJ ?  d ! $ Histogram ^ '^ !'` ! ` $f ^+J MsgBox suffixT Need to count how many there are, identify which ones have numbers at end, and then find out what max value isk> 'D ^ 'F'H D L ^ L$J FX  F 'F'Hk@> L H'D'Hd>'Dk== ^ \ F'\k=E Use application.value function to convert text to a numerical value. h!. \ (Dim histsheet As Worksheet \$h.N Lay down basic information *** SumStats routine needed N%P( N%$|.P NB@ (jk<]  lAnVariable P, Number Obs P,$ P, r P%(p t P,Number Non-missing P,Number Missing P,Number of Unique values P,Mean P,SD P,Min P,25th Percentile  P,Median  P,75th Percentile  P,Max  P, Data Source: l v P,% histRange.Cells(15, 5) = returnRange histRange.Cells(1, 3) = contdiscA:A P%( handle first variable x0 '6 X x X$z X+ histsheet.Cells(7 + I, 1) = I X$ xA|]D8 DP %Dh ;'B4 now implement Long test, percentiles, unique values$'>'@ X x X$ > X$'> @ '@k7 X$ X$G B 'Bj X$? ~ xA$?  xA$?  xA B x'"d07'"k 7X At this point should select a discrete histogram if the number of unique vals is small.MsgBox AllLongs1 8   b ` xA@ x P, t x  P, @ P,  P,  P,  P, ~  P,   P,   P,   P,0w1 = 3.49 * SDvalues1 * (publicnobs1 ^ (-1 / 3)) x^    x$':d5    x$`':k4 z!G'RjLNote: Class intervals include the left endpoint, but not the right endpoint. v P, RFrequency Table v P, r v P% v P%$|(p v P% v P%$|(Values v P,kX3)If ManualAppearancebtn.Value = False Then v This is the optimal bin width 9 Need to put in code for max, min, and then get bin width  x :    N P R "AB c Sub HistogramMaker1Var(values, noobs, Binwidth, center, manual, minval, maxval, histsheet, number)d1 This is the two variable case  '6 X  X$z X+ X$ A| %histsheet.Cells(7, 1) = "Observation" 8 * , .b 0` A@4 now implement Long test, percentiles, unique values'B$'> 8If Int(oldvalue) = oldvalue Then intcount = intcount + 1'@ X  X$ > X$'> @ '@k/ X$ X$G B 'Bj X$? ~ A$?  A$?  A B '$d/'$k.X At this point should select a discrete histogram if the number of unique vals is small.$ P, t P,  P, t   P, @ P, * P, , P, 0 P, ~  P,   P,   P, .  P, ^ . 0  x$'<d0- . 0  x$`'<k-   x  : <   0 . N P " $ RA k, P% v P%$|. A P%B@H zB@| !( !( z!( F Check to see if A1 style had to be set and if so, set it back to R1C1 G  "(j "(N+ "(NHistogramGenerator.HideoP+ Cancel button routines zB@| Unload Meo+ !( !( z!(  zB@| Unload Meo*( zB@| Unload Meop*h o`*#This handles the R1C1 style problem From VBA Help on Range Object:BIf you use a text argument for the range address, you must specifyFthe address in A1-style notation (you cannot use R1C1-style notation).HCheck to see if the sheet has A1 style as soon as the user clicks on theQVar1refedt input box. Change it, if not, then change it back when user clicks OK.'default "! PLeft commented out code below in case Howland decides he wants a warning messagemyResponseRefStyle = MsgBox("The Histogram Creater requires that the spreadsheet be in A1-style not R1C1. The A1 style will be set and you may then proceed to create a histogram. Do you wish to continue?", vbYesNo, "A1-Style Needed")+If myResponseRefStyle = 6 Then 'this is yes'  "(End Ifk&o&&'  ! $'  !$'XAttribute VB_Name = "HistogramGenerator"D Bas0{14ABDFF4-B63A-4125-9C9E-B18DF9&AEC}{12BE0454-52B7-4ED3-9664-D7C@FDB426 } dGlobalSpacoFalse CreatablPredeclaIdTru BExpo se0TemplateDerivCumizDOption 0licit ' * MultiPage1 Form*There g two ps in @this mp art f  ' Input}.. 3 OutN pg  C Subroutine odulW'@ A(P@P@RCOKbtn_CG8k() D! PutCOnCurrentSheet =MakeNewPly  % (V@Wthe8 maZ?,Ca ncel tons0ManualCJdF  kand  DGV -- To be deleted? HDc FuncUtimeGetT Lib "winmm.dll" () As LonB'Dim lngSt@NkG`D r;*= EndCaMc'@ ZJ -j  !BComm'But`71Pr.HidZIf Cells(1, 4) .Valu"" Or AppXa!(.Works!SE.IsNumber() @{nCeMsgBox promp t:="BNAd*j`m`^ Qonly avail+"o t¶s a`a se@mwu.@u@AYg f@ure, rece you r ,^king s to a neDw ", +s:=vbCritical, TitleNo LPossiAd0ExitB9If4 aNigPcopunte 0S= 0@get@_ b g85, 318<> 80'i t's a)e vaH!3OneV`arLoc=8M id%; , 14."'" &@ Left(k,1@StraL "!")\1) 3, 'l`oad d"" R>eb-0."Range ).C 1j i1oSd13,non-miaE1R3pwc(on8i4~4G!+ 1aT` <(i*Nex~EҊ$!{$ Two$B$F$h0112mymaxsizeg= + ).Rowss #"olumn > 6q /-CS9#,C#,1((+2 !1 pEA =2?7 <1i'9r 6(/X#a 6s\ 6uoi6N6u;?$2$G O r2, O 3 1O ;C 2(uO 6bߵJO Cfc/ Y8 ooaVmCH VooSol?FAߵoobp2+e> 5<ooer O oFoO d1` 'IF1ch ? versus A= organ / :on3f O rigin`obins de, 5lue LatestnoBins = Cells(1, 4).DVaIf > 95 ThenE X=, '*  AdjusterForm.LabelActual.Capt8ionp Z7ScrollBar1)0LargeC hange60.025 * MaxQ!2SRhow E@nd SubPriv InputOKbtn_Click() 'is the main routin Dim my SelXRzAsR  'Time(1 To 2) Longgraph!FStri' @enslst( mentsVarlx ' curr ly onallow 2 variableY0?r7cont@@s Bdataat's beselected#6yesA=Boolean&Ire a 0? |noB I2@ number of DAAONumRdow '@ rk%Qif i"trn'tblockColcolumg8nob%er N2s5B totalnotvaTh%ues, inclCjKKKB' Not cFqimXpleuj'M*P a,`'ould figuPJt`,~ `Hu u@nique ; af0 sorq1'` HowtmindeR"RPLG= piveB[.N0OswoAZweka`tp10041A)a#[j =/1D )-- crucJ p!AX SGY=C(3. my w& @"!" & x.Add0^C0ore(Y@ = 0qb+-- shJ2Jbe d P@ @move&dOInIioTr.I 'xW154) PCDXJpumXOap = pBK! ٭= `*V= 0a5) ?P=YesSP6P]P1deisOa kYWa ZW' F*j^SZ If numvars = 2 Then MsgBox "Blocks can contain only e |iable. Please try agH." GoTo:8:End Ifnobtotalnovals ' We're dealing wit h a b which byfinition has justlabel`%L ye1True| 'Skip over 0the no1TVar (1)mySelXRange9IsNumeric(@7myChecks*("ΆN you've chosen isber: " & N& ", vbExclamaAM, Ti@tle:="H Provm")K' rqs- M 0Else{ /  ~Dataa7n't |sRoAIskdorganizedAcolumnsT? @ z,A 7Col) Te@i¾@ s >^@kIsIn btn.Val@= k w YCmselect9+mo+3an[A4asoTwWc)e$ y, j)?z) W`e6{n(l " & j`"}}}}#~EO|5L`6daHES~> ë 2 Z{Fr #sDVvsJ ?91eH q Is9i1)9f 9rV;: ZX i Rj8|O>eq' 'tD]o rese tD Pce we'pmd@S_'Unext#o'texK routin(egO H~qRes G_ oW8 Jq ?$-/qz]s us ba0gs() epqual'#ele~inscA/1 : kђ up O 4tgt pz%e.+ 2G|@iNQ;jN' p#prow\s 9Qpoe(xam9da 0diffPwaA~r~ p ePob(j>) *3GsҚ~d𺿽 G ~!EsP]Ϡ6= {zP {'iC/we(? _pQ'  values(countobs, j) = mySelXRange(i + (j - 1) * n) @End If&N ext iIf j1 Then,Bv1 !Else/2/j='Time2(= r n ZNB0R n@umvars72| A/@ fMsgBox "sre ano A eric for either " & VarlabelN& 2%40{J,ry a@gain." GoTo try: KeD2);(&Iqɚ "is onlyefLq#I'J' 9) Get P data out ofra~. 'actualnoW_(tot-aVs) /(ad Start$lCall store_(,bCk, 7GaC 6(e`b'mygraph (2 ^$'&9="1 aMultiPage1.Outp@g.Visible`Tru9hIn@Faš'Man`-0 Hi(mGenera*.hV`1 v.Int or.ColorIndexxlNon9no?>: 'Go e iA`fDinGD selectiFo ASub@ %"  R` ines#Two r$ involve enabling" t"nfo a`refed@it boxA'! m does ` workc Wshould)go?# F Pri vate  MakeNewPlybtn_Click(E' PutOnCurrentSheetTh*ihrmaA( ` th2c *#"d8efaW"ne wsQ (plyd So  $.r1 B8t.Eed WNametxt@42oH/.:&h,ow%o D(D)i ##Q Gq 'xutrk=1#'BCC OK:3Dim1() As DouV B2MEANg1a7, SDNMAX MIO5 HwWbinsALong3Pgavg i`D`e?mP[alS,Xxww~ sh&), UREj 'addaSa]% w St~op B*'McwB`Vwib e 9mon sG old 'keepack!`bunique)=n@A0 ' 0lto@ҎQAllsBoolean, UTSstayEsuffixu, fai, Str@c"ViewT;(fAppoaj.ScreenUp`= @pHere's whatPOedzo Pchecked' " sDisplau4 Cversus'wqeace7`A`q*' appPt yPimplemwpQ"' S#= A0ve)Sincerq was ju|st$a|i_"au rpleftr)scroro>occupanB# sizeQ Vlow**V?Long Dim Varlabel(1 To 2) As Stri| ' Get the s Call ReFeveRLvs()d10) Check to see if new ply is ced for If PutOutpnCurrentSheetbtn.Valu@e = TrThen) data on c0, s1c vanythwinref edit box B@Rangeedt="" <MsgBox prompt:="You ha ven'tvleDctna r% $wh' ywi End IfA0 weƀ(fCK@g ?r?Lde2Avia error@,appV, *}c@Dute>Bj}@go$S@upperleft@wB(T`17col@ F .C0olumrowsiz980CD12Flower@|+ C@E + @BO@omAuD% > 65536"Not en0oughdisplay histogram. F'A}D"5E"25!,s_?P %P?>.?Cells(%,!0), 5")$B'pF .Addres@'ƀalready occupiescUbanAREF]i@`C?!*aj%! @HIsEy((@i, j))F|al@F+| 1ae*N`ext jcbic@> 0|`>tz!Y!"Osuggeswicau overwrio`x@V{#E ஂ[ a0chom`\A ear e%,are  caB with`!Bf`righatnngbe d@royed, FDults BELOWr Ca'c E!^^E =a+ Є! @| d 8/23/2002$!sRk WsSc _gC&q#' Uc+b0Ma!."funcconhap=a'eri`\%.sANew<WorksQ#90x '?Qr!Ff=> W8@&\:' L)down basicpba SumStJakr3inӼe.d+˕F .S1, 1 m80, ,40AvaLte#eW;ow.DcGrid>lAf"Are0turn3 , myboxVri2(_S ) P"ia"2qNumpI Obso@=p 2).Horizon gAlignFmP`xlCe!4"tzo,#Os(3l Non-missp  4M histRange.Cells(5, 1) = "Number of Unique values" B6lMeanF7FSDB8EiD9"25th PercentileQ10Redi117#+2+ ax=2 + publicnu mvarsDa@ta Sou]: " & retXurn'1&5  ' e3contdiscolumns("A:A")D.CWidS=H 22 andle first@riableReDimD1(1 To:obsSA1) XavgÐ0For iMGAC1(i^stoxredRC DsPheetD7aIDI Next i Call @qsort() @ , 4 %=p@25@ As Doye, mM 7 intcountC' now i mplem Long testC!s, u old=b]*nAsW 2 ZIf&,> Then&p"G'l+ 1E`nd IfcIn/ Xbs> &Fb 9Com0pute'I;0.2jf8 = VA=A 7C /!$j 1AllADs1`;Tru1 sElssiFa-' At t po` should select a AeBogram ife @$GPs is smg.@MsgBox \waBas(icF := ;, !:=MEANFSD:=SD'axAXinI$᭣3, 2Je4s -Wm; I_ F$W %wuf1Uau&0`v.opuM'wa.3.49 * v( ^ (-1 / 3)dgp4< 862(4q(M)SqrI6O 9- K(10 Log10iP  H 7G eneran.ViewFreqT!xbtn$? w@(1%Qote: Clas! = U l/End If&/ 9  'Next i3Call ComputePercentile(), 0.25, p25X {!@median.7&7&@RHBOO^AllLongs2TrueK8ElsLAq Fay' At t@his po$ should select a discrete togram if e number of Luns s:mq.O1KRange.Cell s3AVarlabel(2Ls 2, '8-.3,Nr 4P -WzABin 6$MEANM 7SD,8 vI 29m80fj@8yfq>MAX ki

DEQFyFGQG!I9?i??0 ?C!q HYI1JK LaKKTKCA//PiPPQ!QAQQQR1RyRRy1UI RTiT  T_\QbH0P8@ (8 _b)b""""Y"4!#I#8# $<!#)$@#A$D!#i$H#$`L!#$   P$ $T!# %   X!#!% \9%)a%   `#y%   d#%`h%I&l#&p#&t#'   x%II'    `I|i'i'`  a((   ` #(#( a();;;`  a(!)<<<` a(I)PPP`I a(i)`!#)#ll q l l`l= lq2l i%liT%xBlllH5-l i%liT%x "5 lq* l l` l q  lql  *   l  A (  l q  lV lq` lq fP 5l\d 5 q?ll`i%x ll5 6't': N:!N^ q6tl  qll: q l`ldcl ll`i%x l ll`iT%x "6 lq8l ll`i%xBlllH5  fQ llq)lq f ll\lK't''&*#4'*#0*F 2406t0't''(*F 6t+'t'':)N 6tl\l0't''(*F 6t+'t'':)N 6tl0't''**F 6t+'t'':)N 6tl\ls0't''**F 6t+'t'':)N 6t/M@MD@\MT@`M@HM` +YM` ,!c%! W-C.5"f%! W/C.5 0$1  2*%xa3,a5Hv x@H<DTt0 40tdl(hx! x hcX]3x5hGcX%x! x,xdfX%x! x,x<Dl$ xhHl(hx! x hcX]3x5hGcX%x! x,xdfX%x! x,xU^hDl$ xhH" $  $ @l=4tYlM\` 5(L!  Lc\]35L4&! aL:\ ]35L3'' :, N<<0:\6NLL 6L< 4'\%! aL%$ Q5LaL"q5LaL"q5L Pq q llq llql+'' '<:\7NLL 6L< l+'' '<:\8NLL 6L< li\%li%$ XLli%li%$ X<xFL< = <:\;]36L<:lqx H4lxJq/x<x H4l >xFL< > <`#tll;/t6L< |4plq q kldllll#x0/xlq q fllp qphlll#x*1/x@ '%'%',%'\%$  (<l=4) l L42lF\%$  d<l=4)x(\%(% 4L(P%((% 4<(\%vNi%:Y%aL5L k>(\%vNi%:Z%aL5L(\%vNi%aL (%vNi%a<% $ ,)6L< (\%vNi%aL (%vNi%a<c% $ ,)6L< >(\%vNi%:[%aL5LvNf(LM @M @lM @lM @\M@TM@lM@M,@RM\@x \,l=4l=)5L!v]ttv]d$lvSllt f%YTYX]Ylt T]4<DLt V qltt qv]dlltollttlq+lltlltlq fO]L?,t U]D?,t U]<?,t U lv]?pHp=(\%(%tF%aL5L8(\%(%vCi%aL5L8(\%(%v]i%aL5L<(\%(%vCv]i%aL5L8(\%(%li%aL5L8(\%(%oLk%aL5L8(\%(%oDk%aL5L8(\%(%o4k%aL5L8(\ %(%oLk%aL5L8(\ %(%oDk%aL5L8(\ %(%o(\%(%aL `6L 0$1"f\%! WL-C.5L!c\%! WL/C.5L 0$1  2 u% $  " $  " $  |d xtth0 xtL< H0$13$ x"fh%x! xWH-C.x5H!ch%x! xWH/C.x5H x0$1 x 2x0$14x$ xHH0$1$ 8me/$ lz/t x$ x ltxdz% x$ x xEl$ xHd| x$` $A`$`$`$`$A ` nrU~|  0 TZ![Q[W ttototS2ot ot 불zotqpX% WJ$*\Rffff*0c4a5703a2$*\Rffff*154a570539*\R1*#11*\R1*#a4*\R1*#337*\R1*#10d*\R1*#32*\R1*#2dz  6PXhp>> " @H Xh02x "  " D8  R "  "   (0" 8+@`hp .   2T("&]qTxME$> "L<(<,<0<4<8<<<%8 zhPꀔ(@ꀬ0@ꀖ84 @ꀠ`< @D @ H`ztvx `p+H )D " lbtn hii2 i) -`t?Pr`p X` |k `8 |+&i % n` |+)il  P` 4+X,I8 xs onI I I I outp `XX`ZT `` L+;I `Xx @` @+AI `Xx `$+GI8 I I it`Xxam`Zt$ `xkP%%UIP  z0@h@t @xp$@v,@ꀞ8@@` @H @ꀌL @ꀒP@@pXP8`p8h 8Xx( x @ l Shif@\ reDr@ P R@ L Chan@ H lick Drop@D <@  @4 P nW odeWWW P h  @( t M@  @p  ( WWd@` dMouseUpW@P @L ( (`x@t `@p @` @P @@ PwiHP`@0l @x\ R@X @H @8 @( @( @P`@H@x h( @`P @ x@`@ @@`0@h X@`@@ h@`@ `x@0d @` ))xj@\ j @X @T xpz'`r@HD @`4 @$ +\ p (08" @HP%h "  "  0(08P -h   * "  <<6(@HP X6`x 6 6 6 (0 86@X`h p x Option Explicit/C/ This variable stores the data in the histogram] p] ] ] pf ] ] ] ] 8] ] `] ] ]  0this is cell C15 where the source of the data is]  0this is cell D15 where the source of the data is]  '   $D  $D 'dP  ' $D'k oDim returnRange As StringretrieveRange (returnRange) =HistogramGenerator.Var1refedt.Value = graphRange 'returnRange zB@ZohL This routine may be unnecessary, since it may be sufficient to just use the public variableX 'o 'lo  z] ]8 Z  X  X Z$8 X Z+z X Z,MsgBox "storedata(5,1) = " & storedata(5, 1), xx) 't 'v 'x 'oP] X < X$ X+ X hoh]( X X$ X+$ XF <o@*ReDim storedata(1 To novals, 1 To numvars)]] Z { X   X Z$z X Z+8 Xs. Z# MsgBox "data(5,1) = " & Data(5, 1) o  PB@H X   %(T   %(T  %P% 9T R9P 9q  %  9T R9P 9qh  % 9T R9P 9q0  % 9T R9P 9q  % H 9T R9P 9q  % Z 9T R9P 9qoxAttribute VB_Name = "General" 'Option ExplicitD This variable stores the data inFtogram PubvPD() As Do,e:Olabels(1 To 2#Sng#pHnovalsBLobs1D, 1bs20um=']phRange DxlR1C1InUsBooleanSOriginal Nobin-LatestnoBOneVarValuesTwo5122Loca@c8 'tvwcell C15 whereBtsource ofBzs<%D Su@b Comp@Pentile(@~Exh ) Dim p pla7CÕp@p*  If IntX(p)e| ' = E(p,` 1) +rp1) / 2 Els=+ 1 @= @nd IfKMNShowHi@@mForm(returnζ`rieve}(H% .Q1refedt@#g'P!'routine may be unnecessary, sin5itsuff ent to just usa$B"(sca= FTG&)&KString@ # B=D~,dO@2 6Re:bBwV Enio#]AAjKG ~j 8ibi, 6jAf('Next ibjc'MsgBox 2"5,@j &h5Ca'svHca!=-c2 5CC,&aaͧi%G (i $E`~NXReKuL#9b0y3Y%/*sw)t')})rs }) )1jy (@*s)' )?6h)b)gYPutIn@-(F4.SelecP!З.Borders(xlDiagoDown).LQStyP= xnDe UpuWith xlEdgepLeft Coznuou "Weight xl@rColorIndexAutomc?_ Q TopO O .O  0.O O thO onA Bot    Q   | Ro o o &??ti?@ ?4InsideVeral % Horiz- 7&&h f lp  $ H$o$ @ T0;$ @ 01 $ +\"l"Tl"dLXl"dD.X@T@l 4BlXlT54 XfD] TfLEl" l",l"$l"(H$ 4LxdpF%x@l P`#Llx;/L5P xfp0L$ LPtDxdp>x@lxFP%l  xfp<D$ xtd"d\sxd"dTi-x@t@lxltk4%l  xfT2 tf\Xx$ T \@ 2     L P Jp < 2 " 8 @ H ` x D D  L <h . D   *( 6X @  (08@X >h * &.2 H  X` p  $   08 `P (!L]2xME0f8> LLL LP x`k@)8 x `i))Om(a,%): the%`Xx`Ztheet`pObje`& hteHi \d Algns.xlsh P`G shle `X hT(stoghe gcd o jP`rive reasonaH`N is i`rHod w`8Dnwid`@6 f``@<Long`b8rent8X `k)8  i)O8@ dis%):`quen%`Xxe po`Zthe d`p( f`&hrica \d= nber of p `0take$ (8 `X the hTtwee3) gcd p jPle f`N 8`rXH `D`@h``<ause`b(87 Fp `k  exH@% 8@$h`X8  `xk&&)Ir I ( minI r `xa th`ttogrxd en%0 0h8 x 0 `p @ 4 ( p $X$@ 0 (  $$ &d@ 6@  @ X@H i %@` @x $@ 6d ^ dt @  lp Hkt@(   H@@ J)X@P  @lh ( LX$@  d@ P LdBt@ i@ #o@ @@x X5 P Ni@ t X( Olx@H p $8  O`  Qd@p l 6 H Vd@ h 5d p VBt@ p b @ d %( d%X@`  d8kHx g$@ \ $X@X %@P T @h P %@ L @ H Q@ D "l@ @ X="@ < dl@ 8 %@4 @@(0 l @@, @X( i@p$ $@  xfd@ \@ %lx@ @@ @  @ %(@0 $@H Plt@ l@@ ``z @h@@Xp8x0@`(|)X>@X4 %X@p0 @, @( ,"L@$ o"*c$ (@ @ :8@ ,@H @@` l@x @ , ^@ }zF1%n@( c,F2`E@HIdF@P Soh(JIdF@ NDPJIdF@ uo@ a@@| Mk@l JQPL9Mk@h IY(M9Mk@Hd M^8M9Mk`OU-%@p` MkHTU1-@\ MkpTUEgp`*G(@X @&b5lV@T !Fb$SDxeIdF@ P t&@L *V@PH Mk@hD H~@@ dF@< d'@8 53@4 Mk@0 [X@, dF@( G(@($ YN@@  Mk@X YG@p dF@ So@ +Y@  Mk@ I-@ dF@ `E@ p6@0 Mk@H NB@ dF@ `%n`xIdF0P@ XH(dn.Z_T*(@pt =6@d Mk@` []@4 dF([g@0 dF8^Np@ dF@ i(@ WB@ MkU,R@` Mk@ JM(H`H`@0d dF@T p9@xD wg@2g_U*9k@4 YU@$ dF@ ND@ 4B@ MkH xWJ*\R1*#336*\R1*#282$*\Rffff*0i4a5703f6*\R0*#15*\R1*#109*\R1*#220*\R1*#337*\R1*#10d*\R1*#100*\R1*#29e*\R1*#248*\R1*#1d$*\Rffff*0f4a5703a3*\R1*#101*\R ,B 0 H ` h         0 5H  h x  ?   $   0  H X !x   ! & ! & H  ` p "; ";    0K  @ P X  x    $  `>p7  "       D( Dp  L < .P D  * 6 @8 x > *   P%p.3      0H$Px    ` @H`x ,B  (@X p  5  ?  @ P $h    ( H&h &  ";";@ h x 2K    ( $0 >7 8H X`h p "x1&G&G 0(A@h " p Fx 8 8 0 H 0h  @     (08"@"` $ ,+ ,+8@ H P X h x  x Macros in this module:rio Sub DiscreteHistogramMaker(data() As Long, novals As Long, histsheet As Worksheet, histogram As ChartObject)" Sub EuclidsAlgorithm(a, b, gcd)m Sub ProbHistogramMaker(data() As Double, novals As Long, histsheet As Worksheet, histogram As ChartObject)is8DiscreteHistogramMaker is from AlgebraofExpectations.xls, See the StockReturnsEG sheet for an example Discrete Histogram 9 October 2002EThe histogram determines the gcd of the numbers in order to arrive at a reasonable binwidthC This is in contrast to a method which might pick a binwidth of 0.56 for Longs, since the Longs might have a different gcd?Pr+ **** may also want to work with major tick Frank Howland 25 July 2001> This routine is designed to use the regular histogram routine> to draw histograms based on scatter diagrams for discrete rvs TE data is the frequency distribution to be graphed (values, frequency)to d6 values are the possible values that the data can take( frequency is the empirical distributionog= novals is the number of possible values the data can take on$$ (1) determine the gcd of the valuesck to 0 (2) determine the minimum distance between them: (3) gcd potentially will give the scale for the histogram]]] ]8]P]  ]]]0]h]ause]f 7 First sort according to values in first column of data, $ Use qsortlong because data is Longs that qsortlong Data, 1, novals, 2, 1 p X  X $8 X$8 X+@ X'X$'r P$' X  stop X$'20 r  A@p 'r X$  G X$'jm' X 'XabMsgBox aMsgBox mindist' r r  Z make a the width and have histogram begin at data(1,1) - a and end at data(novals, 1) + a r'&$8 r '` $8 r 'bd '&  $ G'j$8 & '` $8 & 'bk \ ^0 hP jp X  X$8 & X+\ X write down the data X  X$\ X N, X X  X$8 X N, XLay down the data Get coordinates for histogram X  X 'Z X$\ Z+h Z+j X$\ Z +h X$8 Z +j X$\ & Z +h X$8 Z +j X$\ & Z +h X$8 Z +j X$\ & Z +h Z +j X Z  Z$h Z  N, Z$j Z  N, ZHistogram Title :B@Empirical Histogram !!(d & ' &  e 'dx &'kh % =SERIES(, N!!R2C:R  C, N!!R2C:R  C,1) %L( NB@  %B@H  % ` & 9 b & 99 9q(o x Frank Howland 25 July 2001> This routine is designed to use the regular histogram routine> to draw histograms based on scatter diagrams for discrete rvsE data is the frequency distribution to be graphed (values, frequency)6 values are the possible values that the data can take( frequency is the empirical distribution= novals is the number of possible values the data can take on$ (1) determine the gcd of the values0 (2) determine the minimum distance between them: (3) gcd potentially will give the scale for the histogram]h]]]]]  P]X]p]]7 First sort according to values in first column of data$ Use qsortlong because data is Longs](@X 8 A@| X  X $8 X$8 X+ X'X$'r$' X  X$' r  A@ 'r X$  G X$'j X 'Xp MsgBox aMsgBox mindist' r r  Z make a the width and have histogram begin at data(1,1) - a and end at data(novals, 1) + a r'&$8 r '` $8 r 'bd '&  $ G'j$8 & '` $8 & 'bk  \ ^ h j X  X$8 & X+\ X write down the data X  X$\ X N, X X  X$8 X N, XLay down the data Get coordinates for histogram X  X 'Z X$\ Z+h Z+j X$\ Z +h X$8 Z +j X$\ & Z +h X$8 Z +j X$\ & Z +h X$8 Z +j X$\ & Z +h Z +j X Z  Z$h Z % N, Z$j Z & N, ZHistogram Title :B@Probability Histogram !!(d & ' &  e 'd &'k % =SERIES(, N!!R2C%:R  C%, N!!R2C&:R  C&,1) %L( NB@  %B@H  % ` & 9 b & 99 9qo]0StockReturnsEG$d.d]P] X X d% X+8 X d% X+8 X 8 demphist d%A@o@ This algorithm handles negative numbers by making them positive2 It doesn't yet check to see that inputs are Longs2 We may wish to explicitly dimension the arguments 25 July 2001 Author: Frank Howland) but basic algorithm copied directly from Chabert, Jean-Luc (ed.),: A History of Algorithms: From the Pebble to the Microchip Springer, Berlin, 1999]H]` r G r'rj  G 'j Need to insert test for Longs r"Algorithm won't work because a = 0A@@Fk "Algorithm won't work because b = 0A@@Fk r' '       'dp   'kXP '@o80Attribute VB_Name = "DiscreteHistogram" Option Explicit ' Macros in this module:2 Sub Maker(data() As Long, novalsK@tsheetWork , ChartOb ject)qEuclidsAlgorithm(a, b, gcda$Prob DoubleBJK from Sebraofdas.xlshSeee StockRetur nsEG for an example5 m 9 October 2002QThedzr`mines@K ofnumxord@to arrive aa reasonaM binwidth T@k9contrast  method which might p`ick a0.5A9s, psincDha" differentz * may o waw wjPt Ds (Frank Ho wland25 JulyAj1ÁBQroutgASdesigned RusCreguxlars  &uSqIf@ <`ZnQ `0ys(ua  eQMsgBox< a$ "= F@^Ppa > 1 Ande0=@_kkB=j0td w2d6g H(1,ap poC~(F 6=! !)= )Els y/ 5- Round(8, 0)0Tru 8|1O G> EIfq(cBEH.5Ac t(A5sSXs5 *+orJypA8 daABtDim iӁA jdWEg#XcleftI[AfsC Re G1 Toa- 1;lM X yOoddBool ea@2&First sort accordingC!`Jin f"columnA5A;!jU`dql@u1c~af?@Da\a!, bG5&}O  b a, 1E, 2Ѡ Fji&g*i)`i@)@ N`ext iA 28 a 20 @=Ps Z Whi@Ki <6b*i EuclidsAl``m a",aW3 #If( < ETh_  e6MsgBox aGDfaD8= Fa >Aa` m ak͂ have(8begHAC(1ۀ@/a" "3+a%i =%}D=A cA C%M`F$M Els yE/ = e- Round(8, 0)0 q lxO 1 +X1sIfq(1 AP D/H.Xsc t(7Xs53oIy9%O 8?3 x8mAU8' wrirdow"^d Q]tells(ipB4?S {5Dt= La|{ 2Get coVJh[ jDi@/41gX(j y0P}Q2 y=+2)+c  {2(B?G ` l t 41=&jpi37A @, 38j1?3'v TitlKҊ."$\ ".a"c s.T1m= _ "Qabil0ity V@ O^f=n T=iT qbDSQ"SD > Y PSeriesColҨionx.0mp1"=SERI0ES(,qۗNameq37&} 3."7دcnE1so? w" #0SaTestDis,v(4By_!  SWm= Sas("StockReturns8EG"E/o 3, 1 To 2) As Long Dim ipFor8B=3 D ata(i) = mysheet.Cells( 19 + 40) VV1+Next i~screteHistogramMakerZ r,n,whartObjects("emph9"QEnd S@ub  EuclidsAlgorithm(a, b, gDcd' T a handles negative numbers by making them posi ' It doesn't yet check to seeaonputs (aresWe'y wishexplicitly dimen0sion4gut25 Ju!2001"Author: Frank Howl_ but basicmcopi4ed/rLfrDom Cha@8t, Jean-Luc (ed.),A cry (of PsAomA'Pebbl9oBMicrochDipSprKer, Berlin999@ uKvIf a < 0hen@= -a @bGb-z' Ne6]insert test foN=CMsgBox "5 wopwork becauseI0" Goleavenow: If$/mu8@=v9WhiZu <> v$5u @I#A u -E ElsevuCWend b` @ "jt`x8 T(d]g$ dDb T(d]gFdDb T(d]3+'''4:dNDD 6D42T(d]3+'''4:dNDD 6D42  d"qx d"qt lxlt& lxlt lxltqx ltlxqt lxidbl\8$ D4\TSheet9__SRP_1c__SRP_1dBSD'Dr]%#<7N."AY Fxs-@Axxs-@A7N."AYME(SLSS6"N0{00020820-0000-0000-C000-000000000046}(%H@h % %Xp@@\\0WJ$*\Rffff*1A4a5709b64xAttribute VB_Name = "She@et9" Bast0{00020820- C$0046} |Global!SpacFalse dCreatablPre declaIdTru BExposeTemplateDeriv$Bustom izD2Y0lY4l xd$3lxrU @Yqhq!4ih! h` lHth rU @nlpk  (]t6pNrU~| 1Ujd  x dXoplx tplx lx lx lx  xfXE op 춈tpx dP1lx tp opohthopopo`t` xfP o`ohoh 춯 t` m`s routine returns its average, Mean, and sample standard deviation, SD.? I took out the skewness and kurtosis calculation from the codesh The SD is the sample SD.% The Population SD is Sqr(n/(n-1))*SD Barreto Feb 2001& Pass arguments per Howland suggestionxX Added Max and Min to make it suitable to replace Excel generated output for Monte CarlowB This enables more than 65536 repetitions (Excel's row limitation)? Then display rU~|   an!lVaXAgQmymmmmcTXXm1nyn9oKo9! pp`xd0t2lx lx lxl` xf08 qxl`qHl`qp lx lxl`qD@M@DM@HM @ l@qHlxl`lp lxl`qplxqxpNlHlHlpg lHth lHq< lHq8 lpth;lpilpk  (]t6pN ohq< ohq8dTPxdlx ohlxld xfoxd5lxi %(%lxldk%H  xfxdpF?lxi %(%lx i%H  xfpxdhtlxqtlxldltlT ltlPlxldltlT!lx ltlPlxldohltlT!lx ltlPlxldohltlT!lx ltlPlxldohltlTltlP xfhYtd` ;lti %(%ltlTk%H ;lti %(%ltlPk%H  tf` H0K: %\ $ , \a[XX,)\X5 oh|tXohlpkN lptXohtX TH HlT*#P *#L#H*#D *#@#<*#8 *#4#0*#, *#$(H Hl(*#  *##*# *## *# *##*#*F%\ ( %$ , \2.TPLHD@<840,$(  )\5 H >\  %$ , \)\7\  %$ , Q\lP %$ , P)P7P %$ , QPl?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]_`afhijklmnopqrst^wxyz{|}~D  , ]DxME (6 < `Pk@//)8 xpx5991 `i> fithe ibi`@isi erag`Zx s`ption`hk ou``urto  `x k++GI8 Sqr(I toI  & PI` @ggesIb  Min`x to `Ztted `llow`dmore`\ons  `P|kr dHin E'0`X his`Pitio`bhHsing``@latemin.% h8PX@\ @X @ T 8$@P H $ (x` @H`8x@0L @< @, @( `@$ ??@ ??@ @  (PPh@X0 @  @8 @ @x KPG@ 5x)@@ x @ @  @(  @@  ?@X  ?@p  ?@  @  @ @ @ @| WJ$*\Rffff*0j4a5703f6*\R0*#15*\R0*#14  H :X D L &0 FX  ,    , ^H H F J8 @   "  @ J0 L . $ J( x : " & (08@ H 0X  &  0(,0@,0p    ( @ N H   ,"      ( L0 :     " H (h $5 $5     #0  H X  p N x  , ( "0 8 H P X ` h   F :v  0  Source:wB http://www.ulib.org/webRoot/Books/Numerical_Recipes/bookcpdf.html4 A clever way to minimize roundoff error, especially> for large samples, is to use the corrected two-pass algorithmF Given an array of data(), thi 2!3load a v@ that h !!3) Ca:H7li`\b`Ba/:=myA:=E<:=@d IN Ex follow be<\' " sBnA sub?` &`|5index1NnpAlso@5()#, 1= `Dim j%@s#Kep-VTWFH f n1(UBdU) - L + *BsLAX!odyvalu`= _1`P+ FBCaX%pQ)p F`Bj1D TL s`s +c jc If <nH`l>OKNex7@gB/'a!Seco@ō0s?-. $7= aep 7*" C(4- @*A ) / (n='EvCv QmhL= h`j@izoololmlEpO B PSumS@`s8U!ax-M,.EH.. u8doesn'thmen;{OVH:F^ .o pNn@@Wd wh*sXL Ter^s6}6\6),w16X288) 5' 33P3Y3H?k404;j) <{ jK>5C0l3@3cT33H) 4Q4}4r4PR44^wD494q0u44d[Y9i2(3m(09)]`Q=>2qA&-pP(LiP i)pRnJ'x$xϱ]6xaxw p&ij MsgBoxB & "`c"p q sH__SRP_ex__SRP_f HistRoutinesFromRevisions4f__SRP_14g" ,d$ l 5Il 5ILqxl 5ILiL%l ,bl 5ILiL%l ,bl 5ILtl 5Id$(olk<t@l ,Btl6, t@l , fIH the I IJ` isIL$  eragIN( @I:, `IV@0 urtoI4 `t` l `d` \to`@Xy`X$`Z x \xyBr` ^0y2q``y`br es%`&q hPrw8 jswp`"r $ wy`l`w`nget `pin y(Hh &( `TkI  3I (+IF HArraI< hMAX,IHH les I is vIJ($ ubroIL( rrayIN,  AI:h0 (1)I<4 HhI>8 hBounI<  1)I@ rst ID GI(H ) F`Xhx mea`ZtZ \pH Z b Z0 ^l'$8h``dH`b\ eXo ge%`&P  (L  *HX@ ,(Dx .@`"8 $`4  `l(0`n,`p8 (h       ,` %kh )D  iF I<  )O  %): 0 8 %iVh `X x`Zt \p   ^p l   .8 h(  ````bX e Tx %`&L hH   jD   $ @8  `l <`nH 8`pX 4`p ,`$   8`0 `2` ( X%Hxx h8@H *9@8 Is@( bI@H 3$@ wU@t *9@v@ j`@H bI` PH8_@ bIpHPr![HW'*9@xX }p@ bIi@0,@| bIi'^pkou8@ x ~%8mn*9@t ![ m'u8@`d 0,@xT bI@D }Q@4 wU@$ *9@X ~% onu8@ O,(qE*9@H  0,8qou8`zFwU@p *9H{FwU@ u8p{FwUp~F5$@ wUQJ,@ wUY*^ kbI@0 D.HkbI@ =.X0kbI0-,s@(u8MkI@ T*@ wU@ *9@ }p@ bI@ D7@( wU@@ *9@p O,@x bI@h =.@X wU@H u8@8 Q(@( bI@ _A@0 wU@` *9@H ,s@x bI@ ,$@ wU@ *9@ .0@ bI@x e2@8h wU@ X *9@PH k^@h8 bI@( !1@ wU@ *9@ As@ bI@ np@ wU@( *9@X n.@@ bI@p jJ@x wU@h u8@X j(@H bI@8 '2@( wU@ u8@0 y.@H bI@ @y@` wU@ *9@ `^.x(u8P HP $p@$$@X `s@ bI@ 6O@p wU@p *9@t }p@v bI@ AX(pkbI@H ,38pkbI`wr![@p bIHxs![@ bIpx(^ppou8@x 8_@ bI}~%@  bIv![8'u8@H 0,` o*9@ faHU*9@x j`@h bI@X RM@0H wUH4np@D wU _~0@@@ wU0JcAXkbI@h< gg@kbI@8 OkhkbIhB^a@4 bIQ^.@0 bI6U.(u8@(, !&@n*9@`( 0,P(o*9x(@$ `@  @ @  8@H ` @ pHH@  @ @ @ `@H @H %@ @ @ @ @ @ @ p @0 ` @x P @` @ @ 0 @ @  @ @ @! @8! @ ! @P! @h! @! @! @!p @!` @!P @"@ @!0 @(" @@" @p" @X" @" @" @" @" @" @# @0# @#p @H#` @`#P @#@ @x#0 @# @# @# @# @$ @ $ @P$ @8$ @h$ @$ @ @@$| @$l @h @X @T `$X p@ 0  X  x(&%%+8&(P&@% @& @ & @' @8) @`& x&8&<@& &`&<&`&A@& &&D@X' H'&D@( @' @0' @) p'&G@' 'X'S@' ''S''W@'| ''`@(x ('`0('h@@(t X((l@p h(@(l+@(p@(l @(h @@(d @` @)\ @ )X @)T @P)D @h)4 @)$ @) @) @ @) @* @(* @@* @X* @p* @* @* @*p @*` @*P @+@ @+0 @0+ @H+ @`+ @x+ @+ @+ @ @+ @ @ `+( WJ*\R1*#336*\R1*#282$*\Rffff*1B4a5709b6*\R1*#337*\R1*#10d*\R1*#100*\R1*#29e*\R1*#248*\R1*#1d*\R0*#14*\R1*#109*\R1*#220     ( 8H .X          0 @.AX   &   ( HX .Ap   $    0 H :h  @    / &8 -X .Ax .A    6 X  p Lj , w  > 7       $J+ p" x D H 0 @ F` D $  $8 $`    L F8   * 4 , &@ 2h 2 Z *8 <h : < B( p  B * ( H "X  (    *   8 H (X &  T` "  8 @`hpx     ,@X 1p111   R P &X 0    J @8 Dx    (@ P Xh      . @ P  X ` hp     (+ 8   Hh &    (+  H X $p    ( H  /h &      (,  ! ! 8! H! X!x! !&!! !!! ! "" (+0" X" h""  """""# 8# /H#&h# -# .A#.A#.A$.A8$  h$   x$ $r$ ,% ,H% Fx% % &>'7( (((0(8(   @($P(h(J+p((" ( H( 2) HP) ) @) X) (@* <h* * ** R* H+P+X+p+*x+++ ++ ++,, ,(,0,8,@,H,P, X, p, , ,,,,(-1(-1H- h- Rp- - &- 0- (.  *@. @p.. .. #. . / (/ 0/  @/.IX/";/ / / / 0 ,0 0H0  x0 0 0 .0 00 <1.IP1 1 1 $1 11  12(2 H2h222 2 2 /2&3 -03 .IP3.I3 3   3 3Lg3 ,84 hh4 `5'p555 "557555646 6J+(6x66* This module contains Histogram Maker code]]]]]usage eg9HistogramMakerScaled xarray, myreps, 31, beta1, 0, 0, 0, MCSheet, MCSheet.ChartObjects("EmpHist"), 1, histbegin, histend, histwidth ' h㈵>''@   b @ ''@ @e @''@d ''@k`X H  ' H  ']]0]H The bins]]]Dim Nobins As Long]Dim histsheet As Worksheet]] ]XDim noobs As Long]]]]]noobs = myRepsx mySheet.CalculateNoBins = binnoq& ReDim BinSEs(0 To NoBins) As Singlew <\@y <^` < hy < jwK Bins determined by larger in abs value in spread from beta1 of min and maxuy If manual = 0, then use centerJ* If manual = 1, then use minval and maxval J J+\G L J 'pGdD Find the extremes and use them to assign bins, with center value in@I9 center of middle bin or on borderline of two middle bins= Need a rounding routine to get the bin boundaries to be nice$D't$D'v X F X$D t  X$D'tk X$D v ? X$D'vkX X H t '`G v H 'bG'MsgBox "min = " & Min & " max = " & MaxG ` b G `'xd b'xk x'pG H x +\Hk p <'& X <G$\ & X X+\ XG X <G X$\ X  V  N,G XG Put data into bins Z FG'X X$\ Z$D b X <G\Fj X 'XG`\X X$^ X+^G ZG X <J X$^ X  V  N, XLay down the data Get coordinates for histogram$\+h+j X < X 'Z X $\ Z+h X$^ Z+j/ (binleft(i) - binleft(i - 1)) X$\ Z +h X$^ Z +j/ (binleft(i) - binleft(i - 1)) X <$\ < +h < +j Z < Z$h Z  V  N, Z$j Z  V  N, Z lay down no. of reps F, N,/AltDist noobs, binwidth '*********************Histogram Title :B@Empirical Histogram for F Repetitions !!(d&ActiveChart.SeriesCollection(1).Select - =SERIES(, N!!R1C V  :R < C V  , N!!R1C V  :R < C V  ,1) %L(ActiveChart.SeriesCollection(2).Formula = ' "=SERIES(," & histsheet.Name & "!R3C46:R123C46," & histsheet.Name & ' "!R3C45:R123C45,2)"  %B@H  % 9 9 9q NB@ N%B@|;Something went wrong. Simulation not run. Please try again.A@@o> Renamed because this is based on Superimposed Histogram MakerA but has three additional variables histbegin, histend, histwidth) which are used to adjust x-axis scaling. Here's more documentation? This version of the histogram maker scales the horizontal axis= of the histogram so that it's centered on the center and has endpoints which are specifiedThe key parameters are: histbegin, histend, histwidth the key scaling occurs here:.MinimumScale = histbegin.MaximumScale = histend.MajorUnit = histwidthE This subroutine is used along with code like this in the MC routine:@ (in this application we'd call SuperImHistoMakerScaled, but the idea is the same)$ Adjust the scaling of the histogram- (1) Find the SE of the sample averages for& the average with greater spread hwidth = 2* this SE+ (2) histwidth keeps on getting bigger in+ increments like this: 0.1, 0.2, 0.5,T 1, 2, 5, 2, 5, 10$ until it is less than hwidth.6 (3) lower end of scale of histogram scale is set at3 true center less 4 times resulting histwidth6 upper end is true center plus 4 times histwidth; (4) Call a new superimposed histogram maker with scaling information.maxSd = OLSEstimateSD;If AltEstimateSD > OLSEstimateSD Then maxSd = AltEstimateSD$hwidth = 1.5 * maxSd '/ Sqr(myDraws)histwidth = 0.00001mult = 0Do While histwidth < hwidth If mult = 0 Then! histwidth = histwidth * 2 mult = 1 Else# histwidth = histwidth * 2.5 mult = 0 End IfLoop!histbegin = beta1 - 2 * histwidthhistend = beta1 + 2 * histwidthSuperimHistoMakerScaled OLSEstimate, AltEstimate, myreps, 41, beta1, 0, 0, 0, MCSheet, MCSheet.ChartObjects("EmpHist"), SampAveName, AltEstName, histbegin, histend, histwidth, 1M Same as HistogramMaker except adjusted to accept two series on the same plotOn Error GoTo errorhandler:]]] The bins]P]]Dim Nobins As Long]Dim histsheet As Worksheet]]](]`]Dim noobs As Long]]] ]8 ]P noobs = myReps mySheet.CalculateNoBins = binno& ReDim BinSEs(0 To NoBins) As Single <\  <^  < (  < *  < ,  < . K Bins determined by larger in abs value in spread from beta1 of min and max If manual = 0, then use center* If manual = 1, then use minval and maxval  J+\ L J 'pdD Find the extremes and use them to assign bins, with center value in9 center of middle bin or on borderline of two middle bins= Need a rounding routine to get the bin boundaries to be nice$'t$'v X F X$ t X$'tk X$ v X$'vk X X F X$ t X$'tkP X$ v X$'vk  X H t '` v H 'b'MsgBox "min = " & Min & " max = " & Max ` b `'xd b'xk x'p H x +\k` p <'& X <$\ & X X+\ X X < X$\ X  N, X Put data into bins Z F'X X$\ Z$ b X <G\Fj X 'X0\( X$^ X+^ Z X < X$^ X  N, XLay down the data Get coordinates for histogram$\+(+* X < X 'Z X $\ Z+( X$^ Z+* X$\ Z +( X$^ Z +* <$\ < +( < +* X reset bins X < X  N% X+\ X X < X+^ X Put data into bins Z F'X X$\ Z$ b X <G*Fj X 'X * X$^ X+^! Z X < X$^ X  N, X$\+,+. X < X 'Z X $\ Z+, X$^ Z+. X$\ Z +, X$^ Z +. X <$\ < +, < +. Z < Z$( Z  ( N, Z$* Z  ( N, Z$, Z  ( N, Z$. Z  ( N, ZHistogram Title :B@dActiveChart.ChartTitle.Characters.Text =' "Empirical Histogram for " & noobs & " Repetitions"&ActiveChart.SeriesCollection(1).Select% Here's where each series is modified@ the number passed argument determines which series is worked on  5=SERIES( "  < " , N!!R1C ( :R < C ( , N!!R1C ( :R < C ( ,1) %L(  5=SERIES( "  > " , N!!R1C ( :R < C ( , N!!R1C ( :R < C ( ,2) %L(  %B@H  % 9 9 9q NB@ N%B@|;Something went wrong. Simulation not run. Please try again.A@@o8( B HistogramMakerSorted Wfinal, myreps, 20, results, Wealthhist, 1, The data is sorted from smallest to largestA In this application I want 5 percentile bins, so NoBins is going to be 20.9 The height of the bins will depend on the interval widthR Requires that qsort and related routines use Long instead of Long in some places.! Also writes percentiles to sheet6 Needs to send percentiles back to the calling routine Example of usage:# qsort Wfinal, 1, myreps, 1, 1K HistogramMakerSorted Wfinalvector, myreps, 20, Results, Wealthhist, 1]X ]p ]  The bins] ] This is for testing purposes]0 ]H Dim Nobins As Long]` Dim histsheet As Worksheet] ] ] Dim noobs As Long] ]@ ]X ]p ] ] noobs = myReps mySheet.CalculateNoBins = binno& ReDim BinSEs(0 To NoBins) As Single <\  <^  <.*Testing purposes < h0 < jPK Bins determined by larger in abs value in spread from beta1 of min and max If manual = 0, then use center* If manual = 1, then use minval and maxval$D+\$valrange = values(noobs) - values(1): Assign bin boundaries and numbers of observations in each]Xp'2 X < X < F'0 0$D X+\ 0 2 X+. 0'2 X X < X$\ X  V  N, X$\ X N, X Put data into bins For j = 1 To noobs i = 1& Do While binleft(i) < values(j)) If i = NoBins Then GoTo leaveloop: i = i + 1 Loop leaveloop:( bincount(i) = bincount(i) + 1 Next j X <6histsheet.Cells(i + 2, 25 + number * 10) = bincount(i) X$. X  V  N, XLay down the data Get coordinates for histogram$\+h+j X < X 'Z X $\ Z+h X$\ X $\ ' G'j X$.  Z+j X$\ Z +h X$.  Z +j X <$\ < +h < +j Z < Z$h Z  V  N, Z$j Z  V  N, ZHistogram Title :B@Empirical Histogram for F Repetitions !!(d&ActiveChart.SeriesCollection(1).Select - =SERIES(, N!!R1C V  :R < C V  , N!!R1C V  :R < C V  ,1) %L( NB@ < $\ <$\ < $\'dP <$\ <$\ 'k(  %9 9q  N%B@| ;Something went wrong. Simulation not run. Please try again.A@@o x =Attribute VB_Name = "HistRoutinesFromRevisions" ' This module contains dogram Maker0de 0 Sub20Scaled(values, noDobNobG, Center, manuallin)x|tsheet,  #sDumb5approxSE) @ Dim#end As DoublbeginwidthC multL(ong9'usage e'} xarray!hyrep|31@, beta0, MCSq.ChartObjects("Emp-"), fwXJh]= 4 *   0.01 B4= 0O`o Whiy <"  If E enCAI* 2D@ CElse1%.5g& @@A%EIf LoopLÍ=D - 2@UF+Me&Anijleft()@ 9e @coun çM˽ax # 'CsAmyqWorkA" OhsEX)c Ay"bAnalySE BinSEs Singechoice1 colran~ < 'c`= myR}'"|.CalculatNo@s#no@' Red0 To @@D$sF)&Dm F'=X(B ^B[`[T y~ d e`md by` larg@ȀTabs ,ue spread fs o@tmaxi' b`(then us@ˀ*& a @5 %,)` %!9' {CD@a`#' Fi  extremesBam to assign"}, wic$D# dd or oorderl-a'two mi%sNeed a rCdP1Qaget b1ari P be n3 comp@@~(1x11Fp ip~21.3W1$i) < nT@nih]5>`x -d& N i1Y8e Y# -g'Msg`Box "" & !& "1 Q2>xlv%L8p;vY2AF'64D  /0Sp`. &O. Q6&=0) +*38Xq.Cells(i@2, 24pn 1%$' Put dataQQ8}jPr L458D5*`P Dy( A6 42! !j!7p 81t;8 +'$no.!x  3} 44d<'AxltDUH d'***0}6 8Tita1R*.ActSivate ActiveChart.(TitlePacters.Text = _ "Empirical Histogram for " & noobs" Repetitions" ' Series Colleon@(1).Se  g-Formula =SERIPES(,hsheet.NamBe!R1C27 + number * 10 :R"q& NoPbins227<8<7q,1)2T).'"3C46:R12SZ7!R 5 5,2'IrAxe s(xlCgo ry} With Y G.MinimumSez beginaxend jorUniAwidthEnd #CCalc@ells(1, /ExSub ErrorHandler: MsgBox "Something went wrong.d S,lat run. Please try again.( SupӂmMakerEd(valuesS&2,,, C er, m anualin@xf, A}yni m /,"*Cno)` Read becauA@ is b d oneposed but has three add variablesBawhic@h are @d tojust x-`Fs sJ3.aHere's modoc\um@&3Tv` ofe%O*@1 th@orizont !soat itc3!#= @Ia @-po ints sp@ecifie`]'Tkey pam`e:A`t$Aa" occur,`"@ava'q `@,vlaq-subroutine!FIB7alf wcode like2in1MC d b(Mapplmwe'd @>lOIi, N!A idea#saZAAdHOCHB Fi`ASE plZ Jag`F@7#Aa#grer spa=ehBo 2* SED2)BT keepsa7getg bigg@qT]incr ea/s: 0. @0.?0.5,g }5,p 10guntil@10>q?an Sr:@3) low p%!}Q+e.C#s et attrue 54 tim0resulQRX pW  )plus %!(4) pdl a new s[O mq\A Hgin!mRHp maxSdOLSEsp p!SDp@If Alt' > * AnpJq'V$1.5c'/ Sqr(myDrawsQ] 0.01A pDo Whi-<@& x0B @u!* 28`UtEls@,/=ٰ.5' vIfLoop`AS beta1 - 2 4q!=n+O{ C^-,qwr:, F44r, 0%MdCS, Odbjs(t"), SampAve!f { ߃2/!5'aJs'zz exce^p5P uc"two sbFLS ploa8On b GoTo eh@Dim i As L_ 'j/Pleft()Dou0f'a%Mnsc~oE'Mtaxm' my1Workb1 =Y!x1)7Y 2qY . Analy@kǀBinHc:S Kl7ch0oice colOЧrang''s = mlyR0d'"0.S8No` s:inno 1=Re Go0aB# p2%s%3%1 ,c!W@2C4$B |x2(e ReDim Y2(0 To 2 * Nobins + 2) As Doubl ' B|determined by larger in abs valuespread from beta1 of h and (maxPIanual = 0, then use cendr !>1!KlN , TMleft(0)5$ran$geax -G[Els' FidW extremesE] m to as sign , withjot!ddle or oorderltwoC%sNea roundingt=getł&bariQ be nicuEaBcomp;8ues1(1)CjUXF@*i@2noob%ci) <RBKfE -O"iH"A E\If7G'>ax]B=Ca@;Nx i<1<2(< 7<< mM{= Cra(Max@eE-$'MsgBox "@<" & A & "5%!::!> A EL!`' #v-/@YE"OF% widbP# / L# {ۢ@L=@+ ~*V%:c B histsheet.Cells(i!, 241EEgE ' Put data`ǃj71h11Do Whiâ a0_7{|2(_7qZ\72o7 o7 l7y1 x7OI 6Q%%N&4%&4t/4 IC'c /4Q x@O6Y0 (2S7p)6cO2% 42(`C'2 21 W  0370noFk8BH}9 P), 30%g cU'Hxr[ 8Titq.Apctiv^PIepChar Q.acPs.T!= _!L% "EmpiricWb0" RepetitioHns"Se!Colleon`.SeA/' Here's whp each s is mod`ified 1nhumb@p !rhgum ai!workon'o ).'mula4  "=SERIES(" " myn0ame1$",'N!R1C2<):R"&R#i2!tnoe` <- "Ƿ10 * histno & ",1)" ActiveChart.SeriesColleTon(2).Formula = _  "=SERIES(" "" myname22 $",0sh`eet.N !R1C29 +" :R" k& @Nobins2?,^;n <30<7,2 Axes(xlCategory)With .MinimumScaleAbegin a"x end jo rUnit widthEnd #G QoCalc!te ells(1, 1).5@= ExSub@rrorHandler: MsgBox "Something went wrong. S2lation not run. Please try agai@:ed routines u9' @teadA `me p lacesAldsoCits 4Need#backA`hlMExa mp#@usage:"7[%8/\1Od>vEor+?R??Dim iJcqAjO2`left(\'6 8`scounD,oa0 'T@RPfor .6g purpose `kG Max'adqKmy8afo c ma6X#'yB noGȃfSEscS Hle5choiceacolerang vTop! ,'CZ=RG'SG!'No~=)yno0'`Re1 0 ToA% 's's '1C7a(a(`N!;'iX(2P%+l 2 By'S1=BdepMmpJd( byVrJ acuesprqKYbeta1!Lc@NmaxIf manual7w_PHnOaYerE1C )n1ph1'S'= #) -'@&sign"d bBdanns!2A_zsqeacq$jnew*1, jold = 0W 0pN= x = (i /`)$*|i`2)a(-b | = Next i6 U (1GK.Cvi4p+10a 7 t A ' Putn߁}va&@ j""o" q@iDpo Wh&P<"j .Fg0n GoD@veloop0u1 18L e5#tjJ&'D5>6'%'Lay dow%' Get coordx(0P#0D/Na6|!TiPA!10X(j4CkReE"-D?"2hen'0y:/4 P 1 021X(d* yAMa@>#j1 '~7pAQA8j 0 P'Histogram Title h@.Activ atL$eCha8rt. Vacters.Tex`t = _"Empirical for " & noobs" Repetitions"  ' iSerie@sColleon(1).Se  )Formula =SERI0ES(,Busheet.Name!G!R1C 27 + numbe@r * 10 :R"o& Nobins227<8<78,1)qCalcIf @. left(0- 1) F:  i: `(pP(@0 :  i:%d (%$ , d2 lh\XT)d6 D4$0  H '("lp"lp("lpt$""lp"lp붫t$7d %$ , Qd(%o$k%c4(%(%H 5+'4'D':N 6D4lDphPllpThpD5@H(xlh\XTd`D4$P0 ha% $ , a[,)6(:8 l(A( : (D0T(d :4 ($(xhX:H 8(0(( :l(A :x h((0H(X 8: ((__SRP_15-RNGandSortModule"+v__SRP_8`__SRP_9*A 9Qiiy      ////////////////P`aAiik(/=)=I(n1(rU 4$`$`$` $`$!`$I`     !"#$&'()*+,-./0123456789:;<=>?@BCDFGHJKNOPQRTVWXZ[]_`acdfhijkmnoqstwyz{}6' : &@ ,h " F \ Xh * 2 6( 4` <  ` bHD ( "8 @P X p 0@P`p ,@H`p "x ZrU~| VZQrrVaXAg-symmmmcTXX1n9st!ku9u! (H48(Bt\h㈵>td qX odo\lXb odtd qXlXod@td qX odtd qX/8odkH(Btl8odkH(Btt5(H"H"1(H8(("51(H8(("58(H]3 HBl$H 8(*s(H%l ((H%l ($H"dx$@l (g5(7$@l ($@l (t5(l$@l ( $fH(BtH(Bt oo okH okH(H(*sH(BlnjH8(Bt$H"d|Mlol$쳫l$l $f|($H"dtAl$id%(08(H (%l$lk4%l(D5 $fte H"d E q$&l$lk8] @l (g5(%l$iH]83%l$q$l$ll$l  f $H"dAl$id%(08(H (%l$li4%l(D5 $f]lll$H"dTl$q l$ll ll$ll ll$ll ll$ll l $f/H"l(8((d"l5&8(H(("l5- 8(H(("5dbAl id%(08(H (%l lk4%l(D5Al id%(08(H (%l lk4%l(D5  f(H%(,%D%l(D,8j:H8(:`F% $ , a[,)6(:8 l(A( : (D0T(d :4 ($(xhX:H 8(0(( :l(A :x h((0H(X 8: ((:x h((0H(X 8:% (%$ , )60(hX8hh> H%$ , )7 H%$ , QolkH%otkH%odkH%c(8$(H%(%l(>5+''':HN(( 6( 0 lR W,lt: %!(hX8h8h8w "p"l1(("L51(("H51(("D51(("@5 (]3=$Blp($*s((%l (%l x"dx@l g5x@l x@l t5x@l  xfx"dx@lg5@x@lx@lt5ux@l xf BtdBt\ odo\ odk o\k(*s(Blpn(jBtPx"dVlpoPlx쳫lxlp xf1x"d+lxi%("%lxlpkh%l,D xfnt"d@8 qx&lxlpk]t@l g5lxi]3lxqxlxlllxll tf@x"d8+lxi%(#%lxllih%l,D xf8PlplLlHx"d0lxqtlxlpltlLlxllltlHlxlpltlLlxllltlH/"lp((x"lL5&(("lH5 xf0x"d(,lxi%("%l,BBlxlp5 xf(x"d lxll xf t"d qx&lxlpk]t@lg5ylxi]3fylxqx&lxlllxll tfx"d+lxi%($%lxllih%l,D xflplDl@x"dlxqtlxlpltlDlxllltl@lxlpltlDlxllltl@ xf /"lp((x"lD5&(("l@5-t(("5d" Altix%(( H%ltlLkH%l,D5Altix%(( H%ltlHkH%l,D5Altix%(( H%ltlDkH%l,D5Altix%(( H%ltl@kH%l,D5 tf0*F4::l,A :h ((X HHp`: P0(@ (: (( Hp:`Pl,A0 : (( H: `(pP(@0 : (( H:%h (l%|$ ,| h)|h68p`PpP0 0 *F8::l,A :h ((X HHp`: P0(@ (: (( Hp:`Pl,A0 : (( H: `(pP(@0 : (( H:%h (l%|$ ,| h)|h68p`PpP0 0 >h %|$ ,| h)|h7h %|$ ,| QhT|<%T@%TD%TcT,$(%(%l,>5+''':N 6D( f T@ l TXpL4D ,H $|hp`P pP0 P0 Tp"p"l"h1(("H51(("D5 lp qx"dC#lxii"ql lxlplllxlhlq xfx"dIlxi% i%lxlpk%H e5K $=(>h]i0xME$> LL <(<,<0<4<8<<<p::@P @>($@☴C%4:<e BP`@kPi pt thi lpH+px `'Hk i (i`r(XD`P r `(Tk #)t +D i%Piiabil`rt`l$D`Vh`X\ VBA v `*k 5`Xx a V t` '`@eded`88 `b@0he r``( it `$ RES+x `+`k @ir  agaiiGA@ z `,8k` Wi| ~@    `0.8k $$d)~ 0 8  celee sheet  i| "`Vx'2 t unctalculate  \ WILLh CTRL-A  X XP i8 X `X Teede`ZP  `P0hk ) ( @ Po  iH  Poids`Vx `( t'h`XpH @ `h1k d ' `X\****+ `p3`k i  to *ile 8`4k.. d0ipes@B |`Tkx )h acroeter cho iiresiMmedi Ei`tto 1`p be `hbe c P`4k NN)h i Thi@ Ei` j to 1`Xd N``h S`\ices`(X zer`,Tgive`xP Exa`Lle 3`HyOut`Ddoub `|+##@ i( tor i, disi oii0i Prs ai$phichi(his i,ndnc  `tkc)h (0neraat once, iPandlipste ii to i Xi$6 `x'^`tistw 0`Xh+` x)h ''@ma iX'>iZ+ZiX`x" U`prand `6k \ 6@8@<(@@x(@x 88 @  P  (P0P(x48@l @\ P8hx|use Normalnd@X et, @T ando@ `8@l 'nror: SD muste @4 SD0pP0Pp@p to computein`@ l 8 @h H  V $drB<:86 `2t"H6@p @` (@@Ll "H6@h @X @ P ( x!  TH6@@RP @X @ @X0 @p @H! @ @  @! @! @0! @`! @ @ @ 0"""`"H"x"@Xl @"\ @"L H6@h< @#, @" @ @ @ # @8# @  p$X$$$#@$$@$D 0$#(@$< $$(>b@H6@, @ @ @ $$:@$ %$A@ %$A$T%&0&H&%&%`jt%%"X@p @` @@ 'PP'h''''8''`nt(''"X@p @` @@ @> H`P((((P((h(`ptx(P("H6@p @` @H h8P))))H6@` @)X ))@T *))(pX0++***r@@X @+P @H @H+ @`+ @x+ @+ @+ @+ @ @ x, ,,x,,,`xt,x,"H6@p @` - ` -..---@zl --"@h @X @8 x p 8 ./0/.H/X@r @/h @` @X/L p/0/@/H /X/@/D //@/@ ////0X/@0< 00/@8 @000 h H 0@11@1l 010@h X11H6b1( 22 282h222@X @P2P @H @2D 2h2@@ `32@< @2, @3 @3 @03 @H3 @ 2 4`4x44H4(4`t844"H6b@p @` H55`55x5505TX@@RP @6@ @< @: @50 @( @5 @ 6 @86 @P6 @h6 @6 @ @ 877p8P8P787h87@XH @h78 @7( @: @7 77@8 87@Z @(8 @88@`9 8(8@8 |@ @8 @ 88(8x97@9 @9 @09 @H9 @ @9p 9`9@9` 99@9P 99@@ H:9@:0 @0: @ X:9970x42PWJ$*\Rffff*0f4a5703a3*\R0*#15*\R1*#337*\R1*#10d*\R1*#fc*\R0*#12*\R0*#14*\R1*#220$*\Rffff*0j4a5703f   0 @ >P < < >( 8>h     B J . $P `  h p Jx R B  %( 8 @ H BP "       = , & &@ h "p  x   $3  2  5    < ` Fx  "  ` ` <x X $ `8  d   "8 &`  n  *( $X f   ( "0 VX .  h "`   .      @ "!`        (8 P `p   "!   @HP px    . B  V ^H .$  "( P 6pB  V ^ .h$     08 B @$H X` h x XC  *8  @` "  XC08 *P  "  "  @ +`p B x$  >  48 Fp $ , 6 H X Np 4 . B ( B0 x $    "   !!! "  ! ((!P! X! h!p!! !!!!!!! ""0"H" h" " " 4"",)" (# 88# "p# # # # #$ " $ $ ($ 8$ H$P$ *h$$  $* $ $%"%%(%@%"<X% %% B % >% >% @ &$`& p& & && &&$&& & ' D ' "h'p'' l',(=(, ( (0(X( <`( ( ( ( ,( T) @p) 0) V) T8* R* * F+ BH+ P+ B+ 2(, :`, , ,, , X- ,X- " ---- - --"- .8.X.`. B h.p.x..... B. / :(/ *h/ / / /// /&*0 80 @0P0 X0h0p0x0 08800 @0 $1 81 @1 P1 h1 1 1 1 *"1 1 2 2 (282@2H2P2X2`2h2 p2 22222 22 2 B2 3 (3 03 $83 `3 x333 333 63 .4 404  h4p4" x4 4 4 24 4 4  4 445@5>H55 65 $5 66 6 6406h6Bp66  6 6664787@7 H7P7 X7" `7h7p7x77 77 77 77 7 8 8(808 88 @8 " H8P8X8`8x8 88 88 "8 8 T8P9h99&W9 9 9 9-9 ::0:,_H: x: : : :4 This module contains three general purposes macros:1) FMRG random number generator%2) Normally distributed random number3) qsort sorting proceduresthe ?The module has an auto_open macro that initializes the FMRG RNGVTo use the module, copy all of it and paste it into a module in your "active" workbookRor, on a PC, from the Project Explorer, drag this module into the "active" project#For questions and comments, contact ,Humberto Barreto Frank Howland bins/barretoh@wabash.edu howlandf@wabash.edu-765.361.6315 765.361.6317X6****************************************************** RNG macrosZDeclarations to enable the FMRG to be used by other modules in the SAME project (workbook)[To enable use by other workbooks, a REFERENCE in VB must be made to this project (workbook)<] ] 6 see sheet CurrencyDoc in Random.xls for documentationead ] ] ] (] P] (]xal Initialize FMRG IA@4 CRandomize runs on open; no need to use Randomize again in any macro ':D F '< useLoad B values from p. 147 of Deng and Lin, "Random Number Generation for the New Century," The American Statistician, May 2000, vol. 54, no. 2t th]#g+D j+Dtt+Dv+DFdz+DDԁ+D„+D)+D +DU +DA +D +D +D+D+D+D+D+D٥+D+D+D+D+Df+D+D%Pick a B, each with equal probabilityG]8  'F$\ F$D'oPTTo use FMRG in VBA code: FMRG runs the rng, myFMRG is the actual random number drawnX$\To get a VBA Rnd, just use Rnd*To get an FMRG value, TWO steps are needed FMRG8 x = myFMRG to get the random number and put it into x5If you RESET VB at any time, you clear the value of B6The If statement below runs auto_open again when B = 0 GA@Bj8This calculates the next "random" number in the sequence  < :    < :   '8 8 '6 :'< 8':o8C To use Random function on a sheet, simply type =random() in a cell( See sheet1 of Random.xls for an example "B@JA@H 6'2iCThis function will NOT recalculate with F9 or Application.CalculateLThis function WILL recalculate with CTRL-ALT-F9 or Application.CalculateFull "B@JA@H 6'Li;The two macros below remain for testing, but are not needed]@BP T'R X@BA@H 6 X+P T R A@@$PA@@ PowerPC G3; 266 MHz -> 9 seconds PowerPC G4; 500 MHz -> 4 secondso X A@H 6'h hffffff? hH}8g?  X 'X h X+A@H 6 X+ko6******************************************************Oct 2004 version@Copy and paste from *** above to *** below into RNGandSortModule of every workbookNormal distribution macrosZ Numerical Recipes in Fortran 77: The Art of Scientific Computing, 2nd ed.; vol. 1; p. 279 Box-Muller Method6 To use, call from a macro with FOUR parameter choicesQ The first choice requires an array so it has to be DIMmed somewhere in the macro Example 1: Explicit ChoosingZ Dim result(1 to 100) as double MUST be DIMmed as double to be compatible with NormalRNG NormalRNG result, 0, 0, 1] These two lines create a result vector that is filled with Normally distributed values basedTh on VBA's Rnd: Example 2: Default Choosingth Dim result(1 to 100) as double NormalRNG resulth Since the default choices are VBA's Rnd, mean zero, and SD = 1, this gives the same result as Example 1it Example 3:n the $ Dim myOutput(1 to 100000) as doublen we'd NormalRNG myOutput, 1, 20, 5he_ These two lines create a myOutput vector that is filled with Normally distributed values basedin on the FMRG routinerages ]]]]] The Optional parameters arehwidthP TypeofRand, which is 0 or False if not set--this means the macro uses VBA's Rndnc' Getting the number of values requested ] $Z'V a Because we generate TWO deviates at once, we divide number in two (with MOD handling odd number) We waste one deviate if oddscale \am sca' Use VBA's Rnd to generate random draws4 X Vstwidt >6 f  '^  '`istw ^ ` 'ba new b bGfj b$b b$'dmation ^ d'@ma ` d   X+Z'>d8 @   X+Z= AltE'>k Xth = 1d " Use FMRG to generate random draws X Vmu >DohA@Htwidth 6 '^ A@H 6 '`! ^ ` 'bh * 2 b bGhj b$b b$'dhistwi ^ d'@ ` d   X+Z'>d @   X+Zbeta1 '>k Xend = kh o` 'This is the old version of normalrandomatDefault was Rnd, 8O To use NormalRandom function on a sheet, simply type =normalrandom() in a cellinW The 3 parameters can be set, eg., =normalrandom(1, 100, 50) uses FMRG, mean 100, SD 50th( See sheet1 of Random.xls for an exampleer "B@J] l \  A@X$l'jiThis is the Feb 2004 versionhistshIt forces use of FMRG/Also forces explicit declaration of mean and SDO To use NormalRandom function on a sheet, simply type =normalrandom() in a cell bW The 3 parameters can be set, eg., =normalrandom(1, 100, 50) uses FMRG, mean 100, SD 50 ( See sheet1 of Random.xls for an example "B@J*]  ,'nError: SD must be >= 0dSD OKdete l  A@Xs $l'nd ki "B@J]H]`  se c'pError!nualdh      $ '   'r use$draw a random number on 0,1 intervalA@Hmap to computed intervaler 6  r  r 'p= Nkxipx]8]P]h$t'V      $ '   'r$] X V'v$draw a random number on 0,1 intervalA@Hmap to computed interval 6  r  r X+tX$ X o]]'$t Ar "mi](@Xp$t   b ` AHiA@@o "B@J+A@H 6  r  r 'xXi@Barreto Mar 2002 7myTInv takes a random draw from the t-distribution with\df degrees of freedom-This is based on the definition of the t-distZ?t=z/Sqr(y/df) where z is standard normal rv, y is chi-square rvj with df degrees of freedom$^%See, e.g., Freund and Walpole, p. 270X/Many Net references cite Knuth, Vol. 2, p. 130.USAGE:Two lines requiredHDim myArray(1 To 10) As Double CREATE AN ARRAY WHERE T DRAWS ARE PLACED.TRNG myArray, 100 CALL TRNG WITH ARRAY AND DF(Example provided in TRNGtest macro below <Used to draw a single t distributed variate in a single cellUser provides df "B@J] | DF must be greater than 0'zd ~ |A@$~'zki "Get number of t deviates requested]X $~'V]p  V A@X]  V ]  |p ]x ] X V X+ A@X Z | Z$ Z+ X$ Z$ X+ Z X-create t distributed deviate and put in array X V X$ X$ |$ X+~ X1Uncomment and go to Test sheet, then run TRNGTestFor I = 1 To UBound(tRand())Cells(I, 1) = myzRand(I)Cells(I, 2) = myyRand(I)Cells(I, 3) = tRand(I)Nexto ]h  $'V$'] X  V$draw a random number on 0,1 intervalA@Hmap to computed interval 6$b    X+ Xo ]' ( $A X' X$ X  , Xoh@ 8 This is a quasi-Exponential random variable in which we7 take lambda = 1 in the standard defn of an exponential9 and adjust the mean and then scale to get the desired SD "B@J  'Error: SD must be >= 0"dPSD OKA@H 6$b    'kiEnd Oct 2004 version=************************************************************* ]@B T'ReNormalRNG NormRand:=result, TypeofRand:=1, mean:=0, SD:=1 ', is an alternative way to pass arguments A@X T R A@@ $A@@!PowerPC G4; 500 MHz -> 17 secondso6******************************************************Sorting algorithm Thanks to David Maharry Aug 2000& quick sort of array x which is x(l:r)M l stands for left and r stands for right, but it's the same as top to bottom: sorts array x[l..r,n] using the mth column for comparison* n is the number of columns in the array xO m is column that will be used for comparison (that is, m is the sorted column)M Barreto made it sort decimal arrays by declaring several variables as DoubleL If you make the temp variable in the swap sub an Long, you can see what the code is doing.? To use, call qsort with the FIVE parameter values as described< 1) The array to be sorted. This must be DIMmed as a Double.I 2) l, stands for Left, or the first row number in the array; usually a 1< 3) r, stands for Right, or the last row number in the array+ 4) n is the number of columns in the array3 5) m is the column that is sorted from low to high Example%Dim myArray(1 To 4, 1 To 3) As Doubleqsort myArray, 1, 4, 3, 2Q This sorts the values in myArray, which is a 4x3 matrix, using the second column%Changed declarations to Long Mar-20028]8]P]h h   $'   $h' h      A h    A| h    A|ko]`]x]]]] 8< found is a check to see that there are at least two unequal entries in the list4 ptemp stores p in case median of three method fails$ Incorporates median of three method Reference is Sedgewick Help from Dave Maharry FH' 'X  X   X $h X $h' X 'd X 'Xk X' X  X $h X $h G X 'jk09 ptemp is needed in case we have three equal pivot values in the median of three method      $h'(  $h',   '  $h' ( ,       A  ( , (  ,  'd 'k d 'k ,  e (  'd` 'kP dF 'k8 k0 < If check = 1 we assigned p already in the Check for smaller  routined ' If x(p, M) < x(p - 1, M) Then p = p - 1 End Ifkp dh 'kP G 'j/ check2 comes from CheckforSmaller and tells us( that all three x1, x2, and x3 are equal.If all three are equal just use the original p 'i P'', This checks to see which element is smaller June 2002 FH ( , (  '% pick x1 because it is larger than x3d '0 pick x3 because it may be bigger than x1 and x2 ( G'j0 This says that all three elements are equal, so we need to discard the resultk ( e ( , '% pick x1 because it is bigger than x2d '4 pick x2 because we know it is bigger than x1 and x3k@ , e , ( ' pick x2d '& pick x1 because we know that x1 <> x2kd'ko]] ' '    $h   '  $h e  'd h   A  '  'k 'o ]]   X $h' Z $h X +h  Z +h0o(0 read in the dataM the array must be DIMmed as a Double to be compatible with the qsort routine]p X Z X Z$!  X Z+80 use qsort A@| Output results X Z X Z$ X Z $( xoph+Attribute VB_Name = "RNGandSortModule" ' This m< contains three general purposeLacros:l1) FMRG rom number`torB2) Normally disd 1'3) qs ing procedures Thehas an auto_open mat initializ=t2Nx!o Xuse%,upy N of it+d pasinto a:in your "active" workbookNor, oH PC, fr=Project Exploredrag?1*{WFor questioWmments\ct>HAUBarre  Ffk Howl bC h@wabash.X hC f@ 765.361.631n57.'~*2mv@"DeclaraC@:enabltzbexd by joVros@~SXAMEBf(p)To \a REFERENCEVB must maZd!ovp IPublic myA)As Do@e Int Curncy ' ssheet DocR@som.xls fဉdocuAFOlag1) 222BbLongfIhSETGC1@Vt p214748364fD(Subx(a0 I3w y '9Gruan; no need g?!7ag%anyI #0-B"= Rnd * @2 ^ 242`'Load `B valr}p. De2` Lin,4 zNCGbW5A~New Cyury,"e Americ@St8~cia@ May 2000, vo@l. 54,@. 2 Dim BArray(1b W25)3)a/6403 D`= 27149F@981 43022 @= 313363236f 7C98G8B460 19B6098IF10c181@`667103684h"37,09K$1C787hc961 04085404217@ECe 4245g 24319G'2P436924  24453 024567Ch4633` 'Pick@B, each wit h equrobabilityq"myX7"604 + b" P9E 2:cY1;1L: '72MqVBAj8de:DQ:.rng,Oo!@t {qwnXgOa@A:, jqV7@gP9XnB9, PTWO {p rrerAedSQ xX0CR ;4/1Px'I~fA``N_Etime,clearfqAB@ы5sp=eaZ0clow rLwJwh ^B 00AnRcalculatnextt "S"嘐 sq!enc0g6P@(bO@Q2 -DR)p@(/ p@## V' j(Fun` `^(rOg'P) fa st@, simp0t "0f500'PowerPC G3; 266 MHz -> 9condc'4; P%4'/egraph qWh&i < v1C X % 0DX > 0.7 A͐\X00Fl Qi_CA0s(i, BkX?3ku If WenW --* -O0ԁ4 vers Coa "נ` abovbe1V"֐]' !=ey`*A (q=aG, OpawTEofwBooaMe0D|SDL$Al Recip^pJ+t. 77:ӣDrt1 Sci@ifComputing, 2nd ed.; vol. 1; p. 279 ' Box-Muller Method XTo use, call from a macro with FOUR parametrchoicesphe f irst ( requires an array so it has to be DIMmedmewhere pin tFoSExample 1: Explic>ChoosDimfsult(1S100) !^doub pMUST4 @compatinNormalRNG.1, 01These two linqcreatexG vectorfat isd+ly distributvalu#base' on VBA's Rn2: Defa1'Q3Sinc1@\dske, mepzero,sd SD 0= 1,@76giv.msJao33:AmmyOutFn0 o G` ,2a5a aFMRGh roe/V@1 As DB B2MRadiDusMFACi 6 OptioXnalr ' TypeofRand, whi$ch0 @Falif not set--th4!8n@=y`|s)L1aGet:e numb{of $Syes@Uc( $= UBound(7())A&eca we@ genereTWO devi`5`t^c` divid@m(tHMOD`ndog0 oddd ' `We wa e ! I^fh'X%In! Uo@'nr@-`drawF-ia` B ISET 0  re2p: F= 2 *Az - sV2:J= ^ + ` @>t0 Or  G>oC"AaR= Sqr(-Log() /,!Gc* c=i)@`b`@z+a+$`E7Tq *A0 $ E IfNex`c`b 9v{8oDHq8$ ~  Ae!:my"2;T=Y7 _>_>t2 ???? ?? ? t?iY Sub1 'TN#Nhold_rsT PLn}S<"5tBvFuncV >Adv(FX'WZBool@q,GZM1rP 0f)y^g`\–: f a sheet, Dsipy t`_ = ()Aa cell/G 3 cc{`, eg.,P|@, 52a* 5 ' See1]om.xlP@e Ap`on.Vol(TrueDqr%Vq I1DNG,oq,B yH0!#~#Feb` 2004#@It for`1<'Alexdecl౲$p'$ G&ORMALRANDOM(#"4"d i""7Q/"e""al"" "n "Ќ""Q"9Tqwg"Po< wDNh ""L'Error:  mu_`SqF6i'OKD$(u(?+(1(Al("Uni%m!DDo2OH#aGq8b  T!v5b(1r,+ 1) !k- 4w`a 30)o0Pia- p]Qtї!֒ 4{p1PP谪:qmapinx* (b0a) + afU gE@(dS,'aLon8g ()) b = (2 * Mean + Sqr(x) ^ 2 h- 4|(<3)yW CK Tmp(RBDF jE&mys|  hA~j`AdD j%(`N+7Hqjq0'creq01de]2 Gww Xay~ s&xv/R/p,y  'Un0~men2tgoQz s heet, 1en run@0a6Ie't!'C= 7s2@OK()~&&&>!u2u1wOct14 versг`*o-VcN(",r esulth,00Z rttimeT`'g!P:=s, Typ8eof3@*:=-SD:=1 'L, Pal@native wa"yYpasrgu1[sdf{zg`< (9 'PowerPC G4; 500 MHz -> 17 second@!SU>'_Sort algorPm4anksDa Mahoo' AugQѷ6ick s02A x5 x(l:r l P  le fnrYrighàn it'`4saaqbotto '"P x[l..r,0n] ua7 mth column formparison ' n is the number ofs in`array xXmXthat will be used (B0is, lcsort(A) SB_eto ma@de it # decimal {s bylng severvables as Dou OIf youNketemp +iswap sub an Lo(ng,cse8e wmW'coKs doing.YTox, c a~qXwithA7FIVE ametvaluPdescribed*1) To ~#ed.C mustDIMmpaqA' 2) l, @standsL`eft, firrow ;.u-y a B1"3) rRighla4)A 5)ɑ -U a = X\(p {CaMyPartiG pv, k, n$!k - 1/U( E0If @+a1Func-&,fou 4Boolea !i,Omiddlex1e, x2h3e checf:HpB@G']a is`re`Lt @|twneq`Een^aćlistECs(torpcahse `i``tLhr `hoailsEIncorporat@EReferencs Sedg ewickHelpÅDave`lhyFH#7= Fals Ui _lWhi@4* A>i < rC bX(iXb@ +Umbca Truani! EFA]AWen!1= i @߂(# >;s y@hn 6W U5!'$need0N!we h#o37vao3 'Ewt!Dc d ErPBl >a_he\@5IqULA1 6C:= (lr) /Qbu3#X([rOC19ЕSPler(xLx2=?@gq@;E<, pT:= 0\$>aCN3_5rz+1 ,o '=3/A1p'_O Q: a O ?p' '1 =@assign>p already7<.rs.' routinO GqM)Wx B_'p bl}-2?F 'Cu2m`lB,@d tellsp 'ARk%B@ @%ayw' ja2@originpA P P1Ő< `J_҃*#DMrLGN0 c=oȂse8lemЈ''June S' ~ `"`M"CNl mP becaPn`gn%#tmE3PFmpbig1r!x1F X%25'@\ say!P$o '<need to @discarhe result( '(End If ElseIf x1 = x3 Then@(> x2(pRl ' pickpbecause it is bigger than;ld @r@2 @we knowH1 ax3O22 _1_>(PqPnt}= - Call swap(X,'@N$n>S(HmWendCkAo Hrr qFX, j[, jhrCltemp C{For A o 1b= X:(@*kh`X(j, K@ Nex ABTTsorttestPing( '`ad in}e d@ata 'barray must`{ DIMm0as aZabe compatiA\ withBq! rou e  myA ((4, 3d !i@Cg$jeE #j)`Cel`ls(17 SB.Valua) ! cd , 3, 2%' Outputus `5) *4a*6a`h+rt lx\XTlxdH lTl\`h+rX Pd@lPlXlPlXlTl\lPlXlTl\ Pf@ TfHTlxd8F)lTl\9 thlTltohlT Tf8h w DLD*\ areXred tstitab ` qx Lqtltplxdh[  믃lp pfh* <`$ |HPdYX  \'d@xy@P8DerWW \  >  출  me$ p<$ c`%p$  p p p ttC<$ p|D% fX%h$  h p h kXl[$D(lh8 j@P(0 @BhK 0"d 0~)= s'''nj@P 6,'''d@M@@ 6`H0d8ߊaG@@B1QP 0l(\ ]g k\<3<\ffffff?]pL<,H}8g?]c' l(\Ll2l @(,%< @$ X  5l @(,%k%$ X ,l<L xD tL 1ToLf<.$' sntt5' sntl5otolϫtdodod;!md tood9 t\oto\(olo\oT $"(oT $ Ti<+=ToLf=$  tt tlotolϫtdododT!md tood9 t\oto\(olo\oT $1(oT $ TiD|D$ P$ c`%p$  p p plll HY@ Htta<PP8Hod`pl$ c`%p$  p p p ? 3ttgll +>HY@ Htt @lP8Hp$ c`%p$  p p p ? 3ttC  ϳ9 tH oHtP oPtX oPoXoXtt` 4$ p qhCϳ9 t`o`tloltt\lhdT olototl\ \fTt($ hH P`YX  $(08@`YX +''':N 6uhP8`="ht://pur'em|H$ c`%p$  p p p  tt>D H$ pp$ cX%h$  h p hB :Xlgl@Y8 @kXl@ DpT<l@.ac.), Carl.hL qxlxt6 ~@ H~`lhh p`P@H\     p8q`1k0` 1 ,`1 ++, `1 ++4 ` A1k++$9 `,a `aq ++( `(0`k(4` 1k++$`,)`1 ++$Q`<y`k((((8`k(((P`$!1AQi(((((((((H `k((+(((81`k((($Y`nrU~|  1Yq  1a)YToolsMenuSetUp__SRP_6t__SRP_7)&gBinAdjusterForm }licit Pub4 Sub AddHist ogramnItem() ' define variables Dim j As Long;IsHere"BeannewiQVHn 3= False0responsI1' Make suathe  ms is visiP CommandBars("Work@sheet k a ").VT ru8scheck langua2gBmy0uStrivIf Left(Apa .OperngSysr, 1)W" The'Thanks to John Talyor % #Intern)al(xlNonEnglishFunc4s) <> Y, RE}{'it's not , t4rygAANwo@rd forPfrom use&Ea K*put`Box("8L ofbinstallB2Exc@el doe$a ppearA#be(US. Plea|eAe )8tha1Bus@a.-mainÁacrosZ@top$@cre@en. F4F$  :@]3P6$%;$ @"%P$ P $c]@P5$ C8 R$ (%'%'%'%'%: %:@ % P$ P $`18P5$/ C8Sl8F%<:@%P$ dP H<  ,  )P<pvnxl8F%<:@%P$ dP H<  , W$A")P<6$dsx@l8F%<:@%P$ dP H<  , $A:]3)P<6$vpvx xf kv/p%l8F%<:@%P$ dP H<  , WdN)P<5dq:@%lC:@%lC q $   ' '0:N@@@:@$:pl8F`:P^iT6$p`P@0 l0Td8H4P<$p`P@0 k]rU $`nnguage] "!$rU T$`$A`H`a !9Qk//////``,(9]xME86 LLLLLL<<<` `k66`Zx`v `d x`T ` 8C%@pX(,"(@om@P deSi@P@ C@< ://w@4 @ $ @8 @ @h @ @ @ @ @@ @ @ @8 P@p `88$@`p)@ @p @` @P @@ @(0 @ @ `WJ$*\Rffff*0e4a5703a2*\R1*#337*\R1*#10d*\R3*#8c*\R3*#4d*\R3*#4e*\R1*#fc*\R0*#f*\R1*#6d*\R3*#4f*\R3*#50*\R3*#30*\R0*#1*\R0*#149 " (08@H *P"2 K ;  D0x$R ,S 68<n@Js P ( @0p x 6 >p " @ X` >h  x define variables]@]X]p']$ Make sure the Tools menu is visibleWorksheet Menu Bar$,(check language] "!$$WThanks to John Talyor ( "%&Tools' =it's not English, try to get the word for Tools from the userdThe 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 "%*' kPdHTools' k0 Worksheet Menu Bar$,%.(s/ Check to see if there is a Histogram menu itemr' Z Worksheet Menu Bar$,%.!.! Z Worksheet Menu Bar$,%.%.! Histogram ...IMeans the Histogram menu item is already there, make HistogramIsHere True'd9Means the Histogram menu item is not there, so do nothingk Z / Add the Histogram menu item if it is not there  l Worksheet Menu Bar$,%.!.%. General.ShowHistogramForm9 Histogram ...9qk8 Display a message to the user that the add-in is ready:You have successfully loaded the Histogram Creator add-in. $ $2You may access the Histogram Creator by executing  : Histogram... Histogram Creator Loaded$@'roxpǴAttribute VB_Name = "ToolsMenuSetUp" Option Exp..\..\..\..\WINDOWS\system32\FM20.DLL\2#Microsoft Forms 2.0 Object Library*#4a$*\Rffff*0c4a5703a2*\G{AC2DE821-36A2-11CF-8053-00AA006009FA}#2.0#0#..\..\..\..\..\WINDOWS\system32\FM20.DLL\2#Microsoft Forms 2.0 Object Library*#41*\R1*#220$*\Rffff*0h4a5703f6*\R1*#21f*\R1*#100*\R1*#2ba*\R1*#1d48<@DH " @ .Hx  " 2  " R 2` X "$     !"#$%&'()*+,-./01234k789:;F=>?@ABCDE6GHIJhMNOPQZSTUVWXYL[\]^_`abcdefgijmnopqzstuvwxyl{|}~%tW((]d]P%W‹)F(s2`@Jד 5_XHZWLNM (2ܸF3nx (2ܸF3n%W‹)F(MEP@SPSSS f(|>"LLLL L L`xpt` `k  ) X` @)?? I UI GI I   GI$ @JI( `GI, II 0 GIR 4 H`Xx`ZtG \p  ^lX@``d`b\ eX%`&P (L *H0   , Dh P