ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ReDim Array (https://www.excelbanter.com/excel-programming/374677-redim-array.html)

Brandt

ReDim Array
 
I have some VBA code that looks at a data table on a worksheet. The code
decides whether or not a given line meets certain criteria or not and if it
does it records the row into the next open row of an array. I do not know
how many rows of good data will be found so I have set a constant Selections
= 50 and then dimensioned the array to: Dim Array_Temp(1 to Selections, 1 to
5). There will however probably only be 10 to 20 used entries. Once the
array has been successfully filled I would like to re-dimension it (or
something) to remove the rows that were not needed so that I can send it to a
sorting function and not have the rows of non used entries.

Thanks for any help

Brandt

Tom Ogilvy

ReDim Array
 
See answer to your later posting of this question.

--
Regards,
Tom Ogilvy


"Brandt" wrote:

I have some VBA code that looks at a data table on a worksheet. The code
decides whether or not a given line meets certain criteria or not and if it
does it records the row into the next open row of an array. I do not know
how many rows of good data will be found so I have set a constant Selections
= 50 and then dimensioned the array to: Dim Array_Temp(1 to Selections, 1 to
5). There will however probably only be 10 to 20 used entries. Once the
array has been successfully filled I would like to re-dimension it (or
something) to remove the rows that were not needed so that I can send it to a
sorting function and not have the rows of non used entries.

Thanks for any help

Brandt



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

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