开发者

VBA for loop addition

I am trying to write a loop that adds odd numbers up to a certain point. How can I get the inte开发者_开发技巧ger i to go up by 2. I know there is a way, it's something like i by 2, but I don't remember the exact command. If anyone could please help me, I would appreciate it


Do you mean:

For i = 1 To 9 Step 2

Next i

Or:

For i = 1 To 10
    If i Mod 2 = 1 Then
        '// Odd

    End If
Next i
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜