View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default For loop with non consecutive number

Hi Zapatista66,

As an example:

Sub nnn()
Dim i As Long
Dim cellarray As Variant

cellarray = Array(1, 2, 5, 10)

For i = LBound(cellarray) To UBound(cellarray)
MsgBox cellarray(i)
Next

End Sub

---
Regards,
Norman



"zapatista66 " wrote in message
...
you can suggest something different from looping with "for"


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