' The following was written by someone on the net.
For i = 1 To 10 If (i Mod 2) = 1 Then '2で割り切れない場合(奇数) Range("E1").Value = Range("E1").Value + i Else '2で割り切れる場合(偶数) Range("D1").Value = Range("D1").Value + i End If Next
' If you're a teacher, you ought to punish your student who didn't do homework himself.