|
下記コードを詳しく説明してもらえないでしょうか?
お願いします。
Sub Test_2()
Dim i As Long, j As Long, k As Long
Dim c As Range
For i = 1 To 3
j = WorksheetFunction.Max(j, Cells(Rows.Count, i).End(xlUp).Row)
Next i
If j >= 2 Then
Range("D2:D" & j).Resize(, 48).ClearContents
For Each c In Range("A2:C" & j)
If IsDate(c.Value) Then
k = (Month(c.Value2) - 1) * 4 + _
WorksheetFunction.Match(Day(c.Value2), Array(1, 8, 16, 23), 1)
c.EntireRow.Cells(3 + k).Value = c.EntireRow.Cells(3 + k).Value _
& Choose(c.Column, "○", "◎", "★")
End If
Next
End If
End Sub
|
|