Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Multidimensional Array
Why do you want to do it without recursion, and can you paste the code
you are currently using? --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Multidimensional Array
Hi:
Wouldn't it make any faster? If you think it wouldn't, let me know and I'll be satisfied. I did the similar thing with the whole array. My code follows: Dim arrSumActPeriodicClaims(15,5) as variant Range("Sum_ActualPeriodicClaims").Cells(2, 2).Resize(15, 5).Value = arrSumActPeriodicClaims I wanted to figure out how to do the similar for only one column vector. What I have now is with loop. intIteration = 3 '--The 3rd column vector For i = 1 To 15 Range("Graph1_ActualPeriodicClaims").Cells(1, i + 3).Value = arrSumActPeriodicClaims(i, intIteration) Next i Regards, Adrian T -----Original Message----- Why do you want to do it without recursion, and can you paste the code you are currently using? --- Message posted from http://www.ExcelForum.com/ . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Multidimensional Array
Range("e3:s3").Value = _
Application.Transpose(Application.Index(MyArray, 0, 3)) Alan Beban Adrian T wrote: Hi: Wouldn't it make any faster? If you think it wouldn't, let me know and I'll be satisfied. I did the similar thing with the whole array. My code follows: Dim arrSumActPeriodicClaims(15,5) as variant Range("Sum_ActualPeriodicClaims").Cells(2, 2).Resize(15, 5).Value = arrSumActPeriodicClaims I wanted to figure out how to do the similar for only one column vector. What I have now is with loop. intIteration = 3 '--The 3rd column vector For i = 1 To 15 Range("Graph1_ActualPeriodicClaims").Cells(1, i + 3).Value = arrSumActPeriodicClaims(i, intIteration) Next i Regards, Adrian T -----Original Message----- Why do you want to do it without recursion, and can you paste the code you are currently using? --- Message posted from http://www.ExcelForum.com/ . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Multidimensional Array
Hi Alan:
Thanks for the code. It works. I wondered if you could also help me with this question. Is there a wa to copy the array from the 4th column vector onward? In another word, wanted to copy only 11 values (not 15). I tried this: Range("e3:s3").Value = _ Application.Transpose(Application.Index(MyArray, 4, 3)) It didn't work. I have been trying to find the help file fo Application.Index, but couldn't find it. Could you please help me? Regards, Adrian T Alan Beban wrote: *Range("e3:s3").Value = _ Application.Transpose(Application.Index(MyArray, 0, 3)) Alan Beban Adrian T wrote: Hi: Wouldn't it make any faster? If you think it wouldn't, let me know and I'll be satisfied. I did the similar thing with the whole array. My code follows: Dim arrSumActPeriodicClaims(15,5) as variant Range("Sum_ActualPeriodicClaims").Cells(2, 2).Resize(15, 5).Value = arrSumActPeriodicClaims I wanted to figure out how to do the similar for only one column vector. What I have now is with loop. intIteration = 3 '--The 3rd column vector For i = 1 To 15 Range("Graph1_ActualPeriodicClaims").Cells(1, i + 3).Value = arrSumActPeriodicClaims(i, intIteration) Next i Regards, Adrian T -----Original Message----- Why do you want to do it without recursion, and can you paste the code you are currently using? --- Message posted from http://www.ExcelForum.com/ . -- Message posted from http://www.ExcelForum.com |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Multidimensional Array
adriant42 < wrote:
Hi Alan: Thanks for the code. It works. I wondered if you could also help me with this question. Is there a way to copy the array from the 4th column vector onward? In another word, I wanted to copy only 11 values (not 15). I tried this: Range("e3:s3").Value = _ Application.Transpose(Application.Index(MyArray, 4, 3)) It didn't work. I have been trying to find the help file for Application.Index, but couldn't find it. Could you please help me? I'm assuming you mean you want to return the last 11 elements of the 3d column vector of MyArray. Three possible ways occur to me: 1) code the transfer (without looping) of MyArray to a blank worksheet, and the extraction of the values to a separate portion of that worksheet or to an available portion of another worksheet (and the retransfer (without looping) of that separate range to an array, if desired); 2) make the functions in the freely downloadable file at http://home.pacbell.net/beban available to your workbook and use the downloaded array functions; 3) wait for another responder to suggest something simpler. The resulting code for item 2) above would be something like: Range("e3:o3").Value = _ Application.Transpose(SubArray(MyArray,3,3,5,15)) What's your pleasure? If item 1), include details--blank worksheet name, and worksheet name and range for the result. Alan Beban |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MAX of Multidimensional Array | Excel Programming | |||
Multidimensional Array problem I can't solve ! Please help me out ! | Excel Programming | |||
multidimensional lookup? | Excel Programming | |||
size of multidimensional dynamic array | Excel Programming | |||
Multidimensional Arrays - VBA | Excel Programming |