2009-09-01から1ヶ月間の記事一覧

Private Const maxNum As Integer = 6 Private n(maxNum) As String Sub test() Dim i As Integer Dim j As Integer n(0) = "a" n(1) = "b" n(2) = "c" n(3) = "d" n(4) = "e" n(5) = "f" For i = 1 To maxNum - 1 For j = 1 To maxNum / 2 Cells(j, i).Valu…

実際のコンピュータで出力された結果を眺めていて Excelのワークシートを使って数える方法を思いついたので紹介します。 まず、次のような表を作ります。 A B C D E 1 1 5 25 125 625 2 2 10 50 250 1250 3 4 20 100 500 2500 4 8 40 200 1000 5000 5 16 80 …

Sub 表の作成() Dim myDate As Date Dim myDate2 As Date Dim myMonth As String Dim i As Integer Dim check As Boolean If Selection.Column <> 1 Then Exit Sub If IsDate(Selection.Value) Then myDate = Selection.Value Else Exit Sub End If myMonth …