View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] daniroy@gmail.com is offline
external usenet poster
 
Posts: 39
Default For i = 5 to 1000 for columns?

Working just fine indeed
Many thanks
Daniel

wrote:
Thats just great Nick, Norman!
many thanks for your help I am just testing all this but I am sure it
will be just fine.
Once again, thanks for your help
Daniel

Norman Jones wrote:
Hi Daniel,

Try something like:

'=============
Public Sub Tester()
Dim i As Long

For i = 1 To 20 Step 2
Columns(i).Interior.ColorIndex = 6
Next i

End Sub
'<<=============


---
Regards,
Norman



wrote in message
ups.com...
Hello there
I am quite often using functions such as
____________
For i = x to whatever
CODE
Next i
___________

but I would also like to use this kind of structure for columns such as

For ? = A to J
CODE
Next ?

But obviously its not this kind of structure anymore, do you know what
to use?

kind regards,
Daniel