Sub DuoiSoLieu()
Dim Rws As Long, J As Long, W As Long, Thg As Integer, Ngay As Integer, Tmr As Double
Dim Arr()
Sheets("SoLieu").Select: Rws = [A999999].End(xlUp).Row
ReDim aKQ(1 To Rws * 12, 1 To 2): Tmr = Timer()
For J = 3 To Rws Step 41
If Cells(J, "G").Value = "" Then Exit For
Arr() = Cells(J + 2, "B").Resize(31, 12).Value
For Thg = 1 To 12
For Ngay = 1 To 31
If Arr(Ngay, Thg) <> Space(0) Then
W = W + 1: aKQ(W, 2) = Arr(Ngay, Thg)
aKQ(W, 1) = DateSerial(Cells(J, "G").Value, Thg, Ngay)
End If
Next Ngay
Next Thg
Next J
With Sheets("CotSL") '!! Chú ý Tên Trang Tính !! '
.[B2].Resize(W, 2).Value = aKQ()
.[B1].Value = Tmr - Timer()
End With
End Sub