LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default VBA (arrays problem)

hi

I wrote this code to help me to plot a normal distribuion curve.

Sub Plot()
Dim mu As Single
Dim segma As Single
Dim xFirst As Single
Dim xLast As Single
Dim X As Single
Dim Y As Single
Dim lngRow As Long
Dim StepValue As Single
Dim Steps As String

xFirst = Sheets(1).Range("B1")
xLast = Sheets(1).Range("B2")
Steps = Sheets(1).Range("B3")
mu = Sheets(1).Range("B4")
segma = Sheets(1).Range("B5")

StepValue = (xLast - xFirst) / (Steps - 1)
lngRow = 0
X = xFirst

With Sheets(1).Range("A10")
Do While X <= xLast
.Offset(lngRow, 0) = X
Y = Application.WorksheetFunction.NormDist(X, mu, segma,
False)
.Offset(lngRow, 1) = Y
X = X + StepValue
lngRow = lngRow + 1
Loop
End With

End Sub

As you can see that the procedure generates points in columns A and B to be
used to create the chart. Is it possible to generate the graph without
seeing these points on the sheet. I mean that you have an array.

Plz help!!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with SUMPRODUCT and Arrays [email protected] Excel Worksheet Functions 2 January 13th 06 09:55 PM
Problem with plotting a chart when using arrays as Values and Xvalues [email protected] Charts and Charting in Excel 3 August 19th 05 09:05 PM
Elusive Problem with Arrays [email protected] Excel Programming 3 April 29th 05 12:50 AM
Arrays Kenny Excel Programming 5 August 26th 04 09:47 AM
Arrays David Excel Programming 5 January 10th 04 05:09 AM


All times are GMT +1. The time now is 12:07 AM.

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

About Us

"It's about Microsoft Excel"