+ Reply to Thread
Results 1 to 3 of 3

Performing calculations on arrays...

  1. #1
    Registered User
    Join Date
    01-19-2007
    Posts
    13

    Question Performing calculations on arrays...

    ...which are in memory and have variable no. of rows and columns.

    I have an array that I have created via mathematical operations with other arrays. So, Arr1, Arr2 => [MATH] => Arr3(R, C). Of course, R and C are variables.

    I want to have the sub-total the columns of Arr3, i.e., I want one more row below Arr3 with the subtotals for each column.

    Now, I could do this via writing Arr3 (herebefore existing in memory only and not in the worksheet) to a worksheet and then writing a SUM formula as MSP had pointed it out in my other thread.

    There will be many (variable number of) Arr3s, each having dimensions (R,C). I want to create another array, which contains ONLY the column-subtotals of Arr3. Say there are P no. of Arr3s, each with dimensions (R, C), how do I write a loop for creating that array? The final array [FinalArray(P, C)] should look like:

    18 42 33 ... 45
    45 6 45 ... 21
    ...
    ...
    P such rows

    each row is a column-subtotal of another array.

    Input is appreciated!

  2. #2
    Registered User
    Join Date
    01-19-2007
    Posts
    13
    OK, I don't think I was clear enough. Check out the foll. code:

    Please Login or Register  to view this content.
    I am assuming the code I want will appear in the "OMG MAGIC CODE!!1" section.

    I want to create an array called FinalArray(P, C) such that it contains the column-subtotals of each Array3(R, C), of which there are P different instances.

    Hope I am more clear this time. The catch is that I don't want to transfer anything other than the FinalArray to the worksheet.

    Please help!

  3. #3
    Registered User
    Join Date
    01-19-2007
    Posts
    13
    Anyone??

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1