کد PHP:
Sub ddd()
n = Range("A1:A10")
For n = 1 To 10
i = n \ 2
If 0 = n - i * 2 Then
Range("B1:B10") = "zoj"
Else
Range("B1:B10") = "fard"
End If
Next n
End Sub
Sub ddd()
n = Range("A1:A10")
For n = 1 To 10
i = n \ 2
If 0 = n - i * 2 Then
Range("B1:B10") = "zoj"
Else
Range("B1:B10") = "fard"
End If
Next n
End Sub
Private Sub CommandButton1_Click()
n = Cells(1, 1)
For i = 0 To n / 2
If n = 0 Then
Cells(1, 2) = "zoj"
Else
Cells(1, 2) = "fard"
End If
n = n - 2
Next i
End Sub
sub ()
n=cells(1,1)
i=n\2
if 0=n-i*2 then
cells(1,2)="zoj"
else
cells(1,2)="fard"
end if
end sub
Private Sub CommandButton1_Click()
n = Cells(1, 1)
For i = 0 To n / 2
If n = 0 Then
Cells(1, 2) = "zoj"
Else
Cells(1, 2) = "fard"
End If
n = n - 2
Next i
End Sub
Leave a comment: