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

Hi,

I hope this works...

P.S. : not tested


Sub copyRange()

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

intRow = 1
Do
intRow = intRow + 1
Loop Until Sheets(1).Cells(intRow, 1) = ""

v = Sheets(2).Range("a1:a100")

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

If Not IsNull(v(i, 1)) Then
Sheets(1).Cells(intRow, 1) = v(i, 1)
intRow = intRow + 1
End If

Next


End Su

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