View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Geof Wyght[_2_] Geof Wyght[_2_] is offline
external usenet poster
 
Posts: 38
Default Macro to copy cells one row up then move down 4 rows & repeat

Josef,
Assuming you know where to start and when to stop, here's
an example that starts at row 2 and loops 3 times.
Geof.
Sub testcopy()

Dim lngCounter As Long
Dim lngCurrentRow As Long
Dim lngTotal As Long

lngCurrentRow = 2
lngTotal = 3

For lngCounter = 1 To lngTotal
Range("A" & lngCurrentRow, "E" &
lngCurrentRow).Copy Destination:=Range("A" &
lngCurrentRow).Offset(-1, 0)
lngCurrentRow = lngCurrentRow + 4
Next lngCounter

End Sub
-----Original Message-----
I have a downloaded report that does not have data on one

row. I need to
copy 5 cols. of data from one row to the row above then

move 4 rows down and
repeat. I've done this with Lotus years ago, but never

with Excel

Thanks,
.