macroCoder
New Member
- Joined
- May 12, 2010
- Messages
- 3
Hello,
I've hit a brick wall.
I want to append a range of values to the end of an array. I define the array as a variant -- Dim myArray() -- and then "move down" a spreadsheet using Excel's OFFSET function.
So far so good. But when I encounter a row of data that meets the criteria I'm searching for, I select the row and... hit a brick wall.
Because I don't know how to APPEND the selected range to the end of the array. I only seem able to replace the entire array with each newly selected range.
The data I'm searching for in the spreadsheet is scattered across discontinuous rows. It is not in a contagious range. So I can't just define my array based on a contiguous range -- I have to "build" the array one criteria-fitting row at a time.
(I could create a new sheet and paste all of the ranges I encounter so that sheet, forming a contagious range, which I could then pass to an array -- but this solution would run too slowly. There has to be a better way!)
Thank you for any suggestions/examples.
-- macroCoder
I've hit a brick wall.
I want to append a range of values to the end of an array. I define the array as a variant -- Dim myArray() -- and then "move down" a spreadsheet using Excel's OFFSET function.
So far so good. But when I encounter a row of data that meets the criteria I'm searching for, I select the row and... hit a brick wall.
Because I don't know how to APPEND the selected range to the end of the array. I only seem able to replace the entire array with each newly selected range.
The data I'm searching for in the spreadsheet is scattered across discontinuous rows. It is not in a contagious range. So I can't just define my array based on a contiguous range -- I have to "build" the array one criteria-fitting row at a time.
(I could create a new sheet and paste all of the ranges I encounter so that sheet, forming a contagious range, which I could then pass to an array -- but this solution would run too slowly. There has to be a better way!)
Thank you for any suggestions/examples.
-- macroCoder