![]() |
誕生日カレンダーを作成する:Excel VBA入門 |
スポンサードリンク | |
Sub test() Dim myBirthday() Dim myMonth As Integer Dim i As Integer, j As Integer, k As Integer '入力範囲をクリアする For j = 1 To 12 Worksheets(j & "月").Range("C4:L34").Clear Next j 'カレンダーに転記する---ダミーデータ1000この処理例です---- myBirthday = Worksheets("名簿").Range("A2:C1001").Value For i = 1 To UBound(myBirthday) myMonth = Month(myBirthday(i, 3)) Worksheets(myMonth & "月").Cells(3 + Day(myBirthday(i, 3)), 1).End(xlToRight).Offset(0, 1).Value = _ myBirthday(i, 2) & vbLf & Format(myBirthday(i, 3), "gge.m.d") Next i End Sub |
スポンサードリンク
PageViewCounter
Since2006/2/27