Hello,
I have to do a data base query that has over 500 rows of data. I need to break up this data into separate workbooks that has a maximum of 50 rows per workbook. Because the query has a different row count each time I need to create a macro that will look down column A and see that their are more than 50 rows and extract the next 50 rows into a new workbook and then look again after that 50 and extract another 50 and so on until the original workbook remains with the first 50 rows of data.
Example: The macro would look at A51:A101 and generate a new workbook and then go back and look at A102:A152 and generate another workbook and so on. This would continue until all rows are clear except for the first 50 rows.
I have to do a data base query that has over 500 rows of data. I need to break up this data into separate workbooks that has a maximum of 50 rows per workbook. Because the query has a different row count each time I need to create a macro that will look down column A and see that their are more than 50 rows and extract the next 50 rows into a new workbook and then look again after that 50 and extract another 50 and so on until the original workbook remains with the first 50 rows of data.
Example: The macro would look at A51:A101 and generate a new workbook and then go back and look at A102:A152 and generate another workbook and so on. This would continue until all rows are clear except for the first 50 rows.