For Next迴圈
[attach]33698[/attach][attach]33699[/attach]
初涉VBA
當A1填入10
希望B欄到E欄的結果 : 如附件
請問程式碼如何寫?
謝謝各位! Sub 加減數()
For i = 1 To [a1]
Cells(i, "B") = i
Cells(i, "C") = [a1] + 1 - i
Cells(i, "D") = i - 1
Cells(i, "E") = [a1] - i
Next
End Sub
作業要自己寫才會進步 [b]回復 [url=http://forum.twbts.com/redirect.php?goto=findpost&pid=116057&ptid=23265]2#[/url] [i]ML089[/i] [/b]
你誤會了,這不是作業啦 :lol
我有上G大神查閱資料
但被For I=1 To 10 和 For I=1 To 10 Step -1 或+1
搞昏頭了~~~
謝謝你的幫忙! [b]回復 [url=http://forum.twbts.com/redirect.php?goto=findpost&pid=116057&ptid=23265]2#[/url] [i]ML089[/i] [/b]
[url]http://forum.twbts.com/thread-23400-1-1.html[/url]
[b]請您指導。謝謝您!
不好意思,因為無權發"短消息",所以以"回復"邀請您,尚請見諒。謝謝您!
[/b]
頁:
[1]