Write 1st and 2nd dimension array values to cells

S

scottzuehl

I am trying to write out the 2 dimension of my arry into a range in
excel but not having luck. I can write out the first dimension with
'Range("L5:L2000") = aSMA' which I assume is dimension '0', but how do
i get dimension '1'?

thx



Dim lngCtr As Long
Dim dblAns As Double
Dim dblSum As Double
Dim lngDivider As Long
Dim lngCount As Long
Dim lngStartPoint As Long
Dim j As Long


lngStartPoint = 1

lngDivider = SMACounter
lngCount = SMACounter




For j = 0 To (intLoopSMAcounter - SMACounter)

For lngCtr = (lngStartPoint) To (lngCount)
dblSum = dblSum + aROC(lngCtr - 1, 0)
Next

dblAns = dblSum / lngDivider
aSMA(j, 1) = dblAns
dblSum = 0


lngCount = lngCount + 1
lngStartPoint = lngStartPoint + 1
Next

intTotaltradingdays = j - 1

Range("L5:L2000") = aSMA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top