beginner999
Programmer
what iam doing here is
my excel has several rows.
A 1 2 3 4
B 4 5 6 7
c 2 4 6 4
D 4 5 8 7
each time i cut first row and paste it next to second row
B 4 5 6 7 A 1 2 3 4
c 2 4 6 4
D 4 5 8 7
Then autofill the remaining rows
B 4 5 6 7 A 1 2 3 4
c 2 4 6 4 A 1 2 3 4
D 4 5 8 7 A 1 2 3 4
Then copy the intial left rows like this
B 4 5 6 7 A 1 2 3 4
c 2 4 6 4 A 1 2 3 4
D 4 5 8 7 A 1 2 3 4
B 4 5 6 7
c 2 4 6 4
D 4 5 8 7
Then cut the next row and repeat the above steps
B 4 5 6 7 A 1 2 3 4
c 2 4 6 4 A 1 2 3 4
D 4 5 8 7 A 1 2 3 4
c 2 4 6 4 B 4 5 6 7
D 4 5 8 7
and repeat the above steps
B 4 5 6 7 A 1 2 3 4
c 2 4 6 4 A 1 2 3 4
D 4 5 8 7 A 1 2 3 4
c 2 4 6 4 B 4 5 6 7
D 4 5 8 7 B 4 5 6 7
For the above problem i started like this and this is just beginning and I got struck at the auto fill. I appreciate your help. The autofill is giving me the error. The error is " Application-defined error or object-defined error
Sub Test()
Dim n As Integer
Dim i As Integer
n = ActiveCell.CurrentRegion.Rows.Count
For i = 1 To n
UsedRange.Rows(i).Cut
Range("o2").Select
ActiveSheet.Paste
ActiveSheet.Select
Selection.AutoFill Destination:=Range("o3:ab" & n), Type:=xlFillDefault
Next i
my excel has several rows.
A 1 2 3 4
B 4 5 6 7
c 2 4 6 4
D 4 5 8 7
each time i cut first row and paste it next to second row
B 4 5 6 7 A 1 2 3 4
c 2 4 6 4
D 4 5 8 7
Then autofill the remaining rows
B 4 5 6 7 A 1 2 3 4
c 2 4 6 4 A 1 2 3 4
D 4 5 8 7 A 1 2 3 4
Then copy the intial left rows like this
B 4 5 6 7 A 1 2 3 4
c 2 4 6 4 A 1 2 3 4
D 4 5 8 7 A 1 2 3 4
B 4 5 6 7
c 2 4 6 4
D 4 5 8 7
Then cut the next row and repeat the above steps
B 4 5 6 7 A 1 2 3 4
c 2 4 6 4 A 1 2 3 4
D 4 5 8 7 A 1 2 3 4
c 2 4 6 4 B 4 5 6 7
D 4 5 8 7
and repeat the above steps
B 4 5 6 7 A 1 2 3 4
c 2 4 6 4 A 1 2 3 4
D 4 5 8 7 A 1 2 3 4
c 2 4 6 4 B 4 5 6 7
D 4 5 8 7 B 4 5 6 7
For the above problem i started like this and this is just beginning and I got struck at the auto fill. I appreciate your help. The autofill is giving me the error. The error is " Application-defined error or object-defined error
Sub Test()
Dim n As Integer
Dim i As Integer
n = ActiveCell.CurrentRegion.Rows.Count
For i = 1 To n
UsedRange.Rows(i).Cut
Range("o2").Select
ActiveSheet.Paste
ActiveSheet.Select
Selection.AutoFill Destination:=Range("o3:ab" & n), Type:=xlFillDefault
Next i