Thread: help with loops
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
mudraker[_129_] mudraker[_129_] is offline
external usenet poster
 
Posts: 1
Default help with loops

I have removed the do loop & replaced it with a single command to find
the nextr blank cell on sheet 1 column c


Sub copyRange()

Dim v As Variant
Dim i As Integer
Dim intRow As Integer

v = Sheets(2).Range("C50:C70")

For i = LBound(v) To UBound(v)

If Not IsNull(v(i, 1)) Then
intRow = Sheets(1).Range("c65536").End(xlUp).Row + 1
Sheets(1).Cells(intRow, 3) = v(i, 1)
intRow = intRow + 1
End If

Next

End Sub


---
Message posted from http://www.ExcelForum.com/