Sub 雙循環(huán)()
Dim i, j
For i = 1 To 9
For j = 1 To 9
If i >= j Then
Cells(i, j) = j & "*" & i & "=" & i * j
End If
Next
Next
End Sub
做個(gè)乘法表[開心]
學(xué)習(xí)達(dá)人
|
mevolf
展開
Sub 雙循環(huán)()
Dim i, j
For i = 1 To 9
For j = 1 To 9
If i >= j Then
Cells(i, j) = j & "*" & i & "=" & i * j
End If
Next
Next
End Sub
做個(gè)乘法表[開心] 且行且止123
展開
@ mevolf Sub 雙循環(huán)()
'循環(huán)語句里面再嵌套一個(gè)循環(huán)
Dim i, j
Range("A1:I9").ClearContents
For i = 1 To 9
For j = 1 To 9
If i < j Then
Cells(i, j) = ""
Else
Cells(i, j) = i & "X" & j & "=" & i * j
End If
Next
Next
End Sub |
承擔(dān)因您的行為而導(dǎo)致的法律責(zé)任,
本站有權(quán)保留或刪除有爭(zhēng)議評(píng)論。
參與本評(píng)論即表明您已經(jīng)閱讀并接受
上述條款。