I am hoping someone can help me I have been trying to do a loop but cannot figure it out. I have two workbooks the first workbook is called Summary.xlsx , in this workbook I have rows of information which I would like to pull into another workbook. What I would like to do is copy the information from the last row in column A paste it into workbook 2 the then go to the next row in column A and paste it in workbook 2, then next row in column A paste into workbook 2 etc until there is no more data in column A. My looping code that I have is as follows;
Set myData = Workbooks("Summary.xlsx")
Set sh1 = ThisWorkbook.Sheets("Option")
Set sh2 = myData.Sheets("Summary")
finalrow = sh2.Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To finalrow
"I have code that goes in here and the code works and copies it over to workbook in sh1 no problem"
next i
The code will copy the A1 but will not go to A2 it keeps repeating A1.
Hoping someone can help identify what I am doing wrong.
I am hoping this makes sense the code I have in the middle is pretty big and works but it will not grab the A2, A3, A4 etc
Thanks in advance for any suggestions and help
KO
Set myData = Workbooks("Summary.xlsx")
Set sh1 = ThisWorkbook.Sheets("Option")
Set sh2 = myData.Sheets("Summary")
finalrow = sh2.Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To finalrow
"I have code that goes in here and the code works and copies it over to workbook in sh1 no problem"
next i
The code will copy the A1 but will not go to A2 it keeps repeating A1.
Hoping someone can help identify what I am doing wrong.
I am hoping this makes sense the code I have in the middle is pretty big and works but it will not grab the A2, A3, A4 etc
Thanks in advance for any suggestions and help
KO