Created
October 7, 2012 04:31
-
-
Save honda0510/3847111 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Sub test() | |
Const MAX_NUM As Long = 65535 | |
Dim num As Long | |
Dim row As Long | |
Dim col As Long | |
Dim result As Long | |
Dim table(0 To MAX_NUM, 0 To 15) As Long | |
ActiveSheet.UsedRange.ClearContents | |
row = -1 | |
For num = 0 To MAX_NUM | |
row = row + 1 | |
col = -1 | |
result = num | |
Do Until result = 0 | |
col = col + 1 | |
table(row, col) = result Mod 2 ' 剰余 | |
result = result \ 2 ' 商 | |
Loop | |
Next num | |
Range("D1").Resize(MAX_NUM + 1, 16).Value = table | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment