Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Write 1st and 2nd dimension array values to cells

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Write 1st and 2nd dimension array values to cells

You need to write to two columns:

Range("L5:M2000") = aSMA

" wrote:

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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Write 1st and 2nd dimension array values to cells

thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Put values into excel range from single dimension array [email protected] Excel Programming 2 February 25th 06 04:33 AM
Mutli-dimensional Array to Single-Dimension Array Blue Aardvark Excel Programming 3 October 15th 05 09:22 AM
HOW TO ASSIGN 2 DIMENSION ARRAY VALUES FROM 2 COLUMNS? -JEFF-[_2_] Excel Programming 3 August 12th 05 05:36 PM
Array transfer - 1 dimension v. 2 dimension JWolf[_2_] Excel Programming 2 June 29th 04 01:02 AM
Getting excel array dimension banavas[_3_] Excel Programming 3 June 8th 04 12:11 PM


All times are GMT +1. The time now is 06:07 PM.

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

About Us

"It's about Microsoft Excel"