Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with filling in an array formula Caitlin Excel Discussion (Misc queries) 5 November 7th 06 08:12 PM
filling a form with an array JT Excel Programming 1 October 26th 05 04:11 PM
Filling a List Box in Excel from an Array Martin Excel Discussion (Misc queries) 4 October 18th 05 11:50 AM
Filling an array with data Dongle Excel Worksheet Functions 2 May 18th 05 06:06 PM
Filling an array with integer variable Erche DP Excel Programming 1 May 13th 04 04:14 PM


All times are GMT +1. The time now is 04:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"