Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filling an array with a Loop
Dim d as String
For d = 0 to 6 ends(d) = Range("A50000").End(xlUp).Row Next d I want to populate the array with the end row of each of my loops, and then pass that array to another sub for use. Suggestions? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filling an array with a Loop
Dim ends(5) As Integer
For d = 5 to 0 step -1 ends(d) = Range("A50000").End(xlUp).Row Next d Better. It works, but, my array size will not always be 5 (6 including 0). It must be constant? My loop steps backwards, and fills my array backwards. How can I reverse it? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filling an array with a Loop
kevin -
i find this a little puzzling. is ends(5) supposed to be the same number as ends(0)? in this example you always start with the same cell (A50000) and go up - with nothing else in the loop all ends(x) will be the same have you tried offset? like: ends = range("a100").offset(5,0) ends then becomes an array of values - voodooJoe "Kevin O'Neill" wrote in message oups.com... Dim ends(5) As Integer For d = 5 to 0 step -1 ends(d) = Range("A50000").End(xlUp).Row Next d Better. It works, but, my array size will not always be 5 (6 including 0). It must be constant? My loop steps backwards, and fills my array backwards. How can I reverse it? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filling an array with a Loop
Joe, there is actually alot of other code inside the loop I cut out, I
just didn't show it. I managed to figure it out. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
help with filling in an array formula | Excel Discussion (Misc queries) | |||
filling a form with an array | Excel Programming | |||
Filling a List Box in Excel from an Array | Excel Discussion (Misc queries) | |||
Filling an array with data | Excel Worksheet Functions | |||
Filling an array with integer variable | Excel Programming |