View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
littleredhairedgirl littleredhairedgirl is offline
external usenet poster
 
Posts: 9
Default Do while not last row

Here's a loop I'm trying to excute that moves items in a column into
rows. I can't figure out completely how to set the loop to go under
that last row.


Sub Macro100()
lngLastRow = Cells(Rows.Count, "A").End(xlUp).Row
cnt = 4
Do While [not last row]
dst = cnt - 1
Range("A" & cnt).Select
Selection.Cut Destination:=Range("B" & dst)
Range("A" & cnt + 1).Select
Selection.Cut Destination:=Range("C" & dst)
Range("A" & cnt + 2).Select
Selection.Cut Destination:=Range("D" & dst)
Range("A" & cnt + 3).Select
Selection.Cut Destination:=Range("E" & dst)
Range("A" & cnt + 4).Select
Selection.Cut Destination:=Range("F" & dst)
Range("A" & cnt + 5).Select
Selection.Cut Destination:=Range("G" & dst)
cnt = cnt + 7
End


End Sub