I have a macro that I need to loop through all of my data until there is an empty row or it hits row 9 (whichever comes first) in the first column and then start over in the next row until it reaches an empty cell in row 1. The reason that I can't have it just go through 9 is because I dont want any empty rows included and not all of the columns have an even amount of filled columns and there is other data in row 10 and below that I dont want included in the copy loop.
Is there any way to loop both down rows until empty data or the last row specified and then also loop over until the last column?
Here is what I have so far:
Using ms excel 2003
Thanks in advance
Is there any way to loop both down rows until empty data or the last row specified and then also loop over until the last column?
Here is what I have so far:
Code:
'Copy Remaining data to "Final Upload"
For x = 1 To 9
Application.ScreenUpdating = True
'Select the stores list from VG list sheet
Sheets("Total VG List").Select
Range("E" & x).Select
If Range("E" & x).Value = "" Then Exit For
Sheets("Total VG List").Select
Range("A14", Range("A65000").End(xlUp)).Select
Selection.Copy
'Copy stores list to final upload sheet
Sheets("Final Upload").Select
Range("A1").End(xlDown).Offset(1, 0).Select
ActiveSheet.Paste
'Select product class number from VG list sheet
Sheets("Total VG List").Select
Range("E" & x).Copy
Sheets("Final Upload").Select
Application.ScreenUpdating = True
'Copy class number next to each store number
Do
Application.ScreenUpdating = False
Sheets("Final Upload").Select
ActiveCell.Offset(0, 1).Select
ActiveSheet.Paste
ActiveCell.Offset(1, -1).Range("A1").Select
If Selection.Value = "" Then Exit Do
Loop
Application.ScreenUpdating = True
Next x
Using ms excel 2003

Thanks in advance