E
eholz1
Hello Excel Programmers,
I am using VBA to create and read ranges on worksheet.
I have a question on how to read and save data in a given range.
I would like to use some sort of Range() method to check the data.
I my case an empty row or two indicates that a new range (or an array)
needs to be created. I would like to read down a given column, if
there are 1 or 2 blank rows, then a new range or data in an array
should begin.
I can use a FOR loop and start at the top of the range, and work down,
doing an "IF" statement when I encounter a blank row or two, define a
new range until next blank row, and write data into a new array each
time a 1 or 2 blank rows are found.
I am wondering if there is a "nicer" way to do this with a range
object and a collection?
I have the start of the range, and the end of the range
(LastUsedRow). I will end up with 5 or 6 arrays (or ranges), so I can
access the data in each of the 6 arrays or ranges). The data are
worksheet names for which I need to do some calculations on. Like add
the numbers on the following sheets, etc. the sheets are all in the
same workbook.
thanks for the info available on this forum,
eholz1
I am using VBA to create and read ranges on worksheet.
I have a question on how to read and save data in a given range.
I would like to use some sort of Range() method to check the data.
I my case an empty row or two indicates that a new range (or an array)
needs to be created. I would like to read down a given column, if
there are 1 or 2 blank rows, then a new range or data in an array
should begin.
I can use a FOR loop and start at the top of the range, and work down,
doing an "IF" statement when I encounter a blank row or two, define a
new range until next blank row, and write data into a new array each
time a 1 or 2 blank rows are found.
I am wondering if there is a "nicer" way to do this with a range
object and a collection?
I have the start of the range, and the end of the range
(LastUsedRow). I will end up with 5 or 6 arrays (or ranges), so I can
access the data in each of the 6 arrays or ranges). The data are
worksheet names for which I need to do some calculations on. Like add
the numbers on the following sheets, etc. the sheets are all in the
same workbook.
thanks for the info available on this forum,
eholz1