ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Beginners' Question : How to move selected columns & rows to a two dimensional array (https://www.excelbanter.com/excel-programming/271990-re-beginners-question-how-move-selected-columns-rows-two-dimensional-array.html)

Erche DP

Beginners' Question : How to move selected columns & rows to a two dimensional array
 


Hello Alan,
what i want is to have all cells value on selected range per iteration
can be filled into two-dimension array.
so, in the first iteration, the range is d4 : e34, to the cells value
within that range supposed to be filled on the array. the next
iteration, the array will be cleared (0 value) and then range g4 : h34
will be filled in to that array. and so on...

somehow, i was trying to use the .column and .row, because i cannot add
the first range (d4) with some integer just to have the next column to
be processed.....

hope this' clear enough...
thanks,

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Alan Beban[_3_]

Beginners' Question : How to move selected columns & rows toa two dimensional array
 
What does "and so on" mean? First D4:E34; then G4:H34 (no Column
F?); then what after G4:H34?

Alan Beban

Erche DP wrote:

Hello Alan,
what i want is to have all cells value on selected range per iteration
can be filled into two-dimension array.
so, in the first iteration, the range is d4 : e34, to the cells value
within that range supposed to be filled on the array. the next
iteration, the array will be cleared (0 value) and then range g4 : h34
will be filled in to that array. and so on...

somehow, i was trying to use the .column and .row, because i cannot add
the first range (d4) with some integer just to have the next column to
be processed.....

hope this' clear enough...
thanks,

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Erche DP

Beginners' Question : How to move selected columns & rows to a two dimensional array
 


no column f in my description...
so on means for every iteration...
i think the pattern already shown..
first iteration : D4-E34 (means two columns 30 rows)
second iteration: G4-H34 (means the second two cols 30 rows)
third... J4-K34...

anyway, back to the problem..
how to specify the range.. ? should be add-able... ???????


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Alan Beban[_3_]

Beginners' Question : How to move selected columns & rows toa two dimensional array
 
I don't recall anything in your posts that specifies how many
iterations; the following loads the contents of d4:e34, g4:h34, j4:k34,
then m4:n34

Sub testab2001()
Dim arr(), rng As Range, i As Long
Set rng = Range("d4:e34")
For i = 1 To 4
arr = rng.Offset(0, 3 * (i - 1)).Value
'do something
Next
End Sub

Alan Beban

Erche DP wrote:

no column f in my description...
so on means for every iteration...
i think the pattern already shown..
first iteration : D4-E34 (means two columns 30 rows)
second iteration: G4-H34 (means the second two cols 30 rows)
third... J4-K34...

anyway, back to the problem..
how to specify the range.. ? should be add-able... ???????


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




All times are GMT +1. The time now is 08:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com