anne.gomes
06-30-2014, 06:37 PM
Hi,
So I have this dynamic pivot table that gets added a new row everyday. At the moment whenever a new row is added to it, the new row always gets added below the row with "1 target" on the column B. Because of this I have to manually go inn and move the row with "Target 1" on column B to the end of the pivot table.
I have this code, I want to know how to move the row with the "Target 1" to the end of the pivot table, to its last row.
Sub test()
Dim LR As Long, i As Long
With Sheets("Queue Trend")
LR = .Range("B" & Rows.Count).End(xlUp).Row
For i = 1 To LR
If .Range("B" & i).Value = "1 Target" Then
'I want to move it to the end
Next i
End With
End Sub
Thanks
So I have this dynamic pivot table that gets added a new row everyday. At the moment whenever a new row is added to it, the new row always gets added below the row with "1 target" on the column B. Because of this I have to manually go inn and move the row with "Target 1" on column B to the end of the pivot table.
I have this code, I want to know how to move the row with the "Target 1" to the end of the pivot table, to its last row.
Sub test()
Dim LR As Long, i As Long
With Sheets("Queue Trend")
LR = .Range("B" & Rows.Count).End(xlUp).Row
For i = 1 To LR
If .Range("B" & i).Value = "1 Target" Then
'I want to move it to the end
Next i
End With
End Sub
Thanks