BIGALINWALES
IS-IT--Management
Hey,
I need to extract some data from an excel sheet into anothe sheet. All of the data is in column A, starts at Row 17 is 5 rows long and repeats every 58 rows.
Example
17 |
18 |
19 |
20 |
21 |
.
.58 Rows
.
75 |
76 |
77 |
78 |
79 |
.
.58 Rows
.
etc.etc
So I need a macro that start at Row 17, reads 5 Rows down, copies this data to another sheet then moves down to the next set of data 58 rows down (from the original row not the original row plus the 5)
If anyone could help I would really appreciate it.
Many Thanks![[sadeyes] [sadeyes] [sadeyes]](/data/assets/smilies/sadeyes.gif)
Alex
PS This is my effort so far, but I'm crap at VB so can't get any further
Dim i As Integer
Dim j As Integer
i = 17
j = 1
Dim ii As String
Dim iii As String
Do
ii = "A" & i
iii = "A" & (i + 5)
Range("ii:iii"
.Select
Selection.Copy
i = i + 58
Sheets("Sheet1"
.Select
Range("j"
.Select
j = j + 5
ActiveSheet.Paste
Range("j"
.Select
Sheets("Year End address P60 test produ"
.Select
Loop Until i = 46567
End Sub
I need to extract some data from an excel sheet into anothe sheet. All of the data is in column A, starts at Row 17 is 5 rows long and repeats every 58 rows.
Example
17 |
18 |
19 |
20 |
21 |
.
.58 Rows
.
75 |
76 |
77 |
78 |
79 |
.
.58 Rows
.
etc.etc
So I need a macro that start at Row 17, reads 5 Rows down, copies this data to another sheet then moves down to the next set of data 58 rows down (from the original row not the original row plus the 5)
If anyone could help I would really appreciate it.
Many Thanks
![[sadeyes] [sadeyes] [sadeyes]](/data/assets/smilies/sadeyes.gif)
Alex
PS This is my effort so far, but I'm crap at VB so can't get any further
Dim i As Integer
Dim j As Integer
i = 17
j = 1
Dim ii As String
Dim iii As String
Do
ii = "A" & i
iii = "A" & (i + 5)
Range("ii:iii"
Selection.Copy
i = i + 58
Sheets("Sheet1"
Range("j"
j = j + 5
ActiveSheet.Paste
Range("j"
Sheets("Year End address P60 test produ"
Loop Until i = 46567
End Sub