Sub test()
Dim LstR As Integer, I As Integer, shName As String, Qt As Integer, MH
LstR = [A1].End(xlDown).Row
For I = 2 To LstR
shName = Cells(I, 2)
MH = Application.Match(Cells(I, 1), Sheets(shName).Rows(1), 0)
If IsNumeric(MH) Then
Sheets(shName).Cells(Day(Cells(I, 5) + 1), MH) = Cells(I, 3)
End If
Next
End Sub作者: hcm19522 時間: 2015-11-30 11:04