Sub Macro1()
Dim i As Long
Application.ScreenUpdating = False
For i = 1 To 100 Step 10
Cells(1, i) = i
Next i
Application.ScreenUpdating = True
End Sub
Yes, but it's rarely necessary to select cells to perform actions on them...
Code:Sub Macro1() Dim i As Long Application.ScreenUpdating = False For i = 1 To 100 Step 10 Cells(1, i) = i Next i Application.ScreenUpdating = True End Sub
I just tested your code and found that it does not select every nth cell. It numbers them.Yes, but it's rarely necessary to select cells to perform actions on them...
Code:Sub Macro1() Dim i As Long Application.ScreenUpdating = False For i = 1 To 100 Step 10 Cells(1, i) = i Next i Application.ScreenUpdating = True End Sub