geospatial
Active Member
- Joined
- Sep 2, 2008
- Messages
- 290
Currently using the below code which breaks at
I am trying to find out how you can remember which row you were on in the loop and then after pasting to Sheet1 you can come back and select your current row in the loop before it offsets.
Code:
Row(iRow).Select
I am trying to find out how you can remember which row you were on in the loop and then after pasting to Sheet1 you can come back and select your current row in the loop before it offsets.
Code:
Sub LoopTest()
' Select cell A2, *first line of data*.
Range("A10").Select
' Set Do loop to stop when an empty cell is reached.
Do Until IsEmpty(ActiveCell)
iRow = ActiveCell.Row
ActiveCell.EntireRow.Copy Destination:=Sheets("WebTas Table Export").Range("A1")
Sheets("Sheet1").Select
Range("A1").Select
Sheets("WebTAS Table Export").Range("A9:AI14996").advancedFilter Action:= _
xlFilterCopy, CriteriaRange:=Range("'WebTAS Table Export'!Criteria"), _
CopyToRange:=Range("A1"), Unique:=False
Sheets("WebTAS Table Export").Select
Row(iRow).Select
' Insert your code here.
' Step down 1 row from present location.
ActiveCell.Offset(1, 0).Select
Loop
End Sub