So basically, let's say your workbook has 10 sheets. Each sheet has, of course, data in the rows and columns. And as you say, each sheet is like a 2D array. So what you do is create a 3D array that's dimensions like this: MyArray(1 to 10, 1 to max_rows, 1 to max_columns)
Max_rows is the number of rows you have, in whatever worksheet that has most rows.
Max_columns is the number of columns you have, in whatever worksheet that has most columns.
And, of course, 1 thru ten indicates each individual worksheet in this workbook.
So you loop through all ten worksheets, incrementing the loop counter each time, and each time copying the data from all the rows and columns of each worksheet into the array. Something like this:
How's that?
If you have lots and lots of data, turn application screenupdating off, and also go make yourself a cup of coffee while it's running.
Bookmarks