Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dealing with unknown array sizes
I have a multi-dimensional array which is initially defined
as follows: Dim MyArr() as String My VBA code will then search all rows that contain data. (BTW, each row contains 5 columns of data.) If a row of data is found that matches the search criteria, I want to place all that string data into the "MyArr" array. So, if my search yields 230 rows of string data, I want my final array size to be EXACTLY 230 rows by 5 columns, or: ReDim MyArr (1 to 230, 1 to 5) Can I redimension the array each time a search hit is found and continuously add data to this array?? I guess I'm really looking for a string array that grows each time a search hit is found. I know I could create an oversized array to begin with, but in my case it is important that my array size be EXACTLY the same number as the total number of rows that I will place in the array. Anybody know what I can do??? Thank you! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to easily vary (parametrize) array sizes in Excel? | Excel Discussion (Misc queries) | |||
Unknown element array | Excel Programming | |||
Array with unknown elements(apologies if reposted) | Excel Programming | |||
Formula's dealing with unknown number of rows | Excel Discussion (Misc queries) | |||
Open multiple "unknown" filenames within a macro (array setup) | Excel Programming |