View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kurt[_3_] Kurt[_3_] is offline
external usenet poster
 
Posts: 6
Default loop through columns (using for-loop)

Hello,

I now discovered the syntax to loop through rows:
example:

For i = 3 To 20
If Range("A" & i).Value = "" Then
Range("A" & 1).Copy Destination:=Range("A" & i)
End If
Next i

How can I use the same method for scrolling trough columns?
How can I get to column B using something like "A+1"

extra question: why is the "Next i" placed behind the for-loop? Isn't
it placed in the for-loop with other languages?

Thanks in advance!