Hello all. I'm new to the forums, I've been here a few times doing searches on threads and this forum has been a tremendous help. Plenty of very well versed VBA folks here so I figured I'd join and ask a question.
I'm currently writing a macro now that is supposed to pull all files out of a particular folder and toggle through each worksheet in that particular workbook. The number of worksheets are liable to change every month so the macro has to know to look through all worksheets.
On top of that, the macro only needs to extract data from only a select few of those worksheets. Some worksheets have data in range A1:A4. If it does, I need it to copy and paste it into a report format (using paste special, transpose). If the A1 cell is blank, the macro will need to just go to the next worksheet within the workbook. I'm having trouble figuring out how to tell the macro to copy the range A1:A4 when necessary and pasting it into the new workbook. The macro also must know to move down one row for each time it pastes so it can paste new data if necessary.
Writing the macro to open up the files I need isn't a problem. Its just figuring out how to loop through the worksheets, check to see if there is data in range A1:A4, copying the data if there is data there, and then knowing to move down one row each time it pastes the data so it can compile a useful report.
Thanks in advance for everyones help!
Bookmarks