I have written code in excel to search and open a file, once the file is open it will copy and past information from one workbook into another. I do not want the entire sheet copied and pasted, I would like to have only certain rows selected.
I want the rows below the header row of row 8 to be copied but to stop once it reaches the cell with the value in it of Reports Total. This could be anywhere from 5-2000 rows to be selected. Is there a way to write a For/Then loop to copy the information in the rows until it gets to the cell that has the words Reports Total:.
This is what I have so far:
Cells.Select Selection.Copy ActiveWindow.WindowState = xlMinimized Range("A1").Select ActiveSheet.Paste ActiveWindow.WindowState = xlMaximized
Any assistance would be greatly appreciated.