Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2006

Tip: Looking for answers? Try searching our database.

Write 1st and 2nd dimension array values to cells

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
scottzuehl@gmail.com - 28 Feb 2006 19:39 GMT
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
Toppers - 28 Feb 2006 20:25 GMT
You need to write to two columns:

Range("L5:M2000") = aSMA

> 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
[quoted text clipped - 33 lines]
>
>     Range("L5:L2000") = aSMA
scottzuehl@gmail.com - 28 Feb 2006 23:17 GMT
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.