½Ð°Ý¦U¦ì°ª¤â¡Aµ{¦¡½X¦p¤U¡G- For i = 2 To 5 'wRow
- With Worksheets("¸ê°T")
- wCode = .Cells(i, "A")
- Set WriteIn = .Range(.Cells(i, 4), .Cells(i, 6)) '¼g¤J¸ê®Æ½d³ò
- End With
- WriteIn.ClearContents
- For j = 1 To 2
- Set xRng(j) = Sht(j).Range("A1:A2000")
- xmat(j) = WorksheetFunction.Match(wCode, xRng(j), 0)
- Set xMark(j) = Sht(j).Cells(xmat(j), 3)
- Next j
- xx = xDay(xMark(1), 6)
- If xx > 0 And xx <> "" Then
- j = 0
- Cnt = 0
- Do While j + 1 <= xx
- Set Pt = xMark(1).Offset(0, j)
- Set Qt = xMark(2).Offset(0, j)
- yy = xDay(Pt, 7)
- If yy = "" Then Exit Do
- If j = 0 Then Cnt = IIf(yy > 0, 0, 1)
- If yy > 0 Then
- With WriteIn.Offset(0, Cnt * 3)
- .Cells(1) = Prange(Pt, (yy))
- .Cells(2) = Qsum(Qt, (yy))
- .Cells(3) = yy
- End With
- Cnt = Cnt + 1
- End If
- j = j + Abs(yy)
- Loop
- End If
- Next i
½Æ»s¥N½X ¦bi=2ªº®ÉÔ¡AÀ³¸Ó¬Ocnt¥X¿ù¡A¦V¥k¤@ª½¼g¤J¿ù»~¸ê°T
¦ý¤§«á´N¥¿±`Åã¥Ü¤F¡A½Ð¨ó§U¬Ý¤@¤U¡A¬Oþ¸Ì¥X¤F°ÝÃD¡H
¥u¦³²Ä¤@µ§³o¼Ë¡A¹ê¦b·d¤£À´¡A·PÁ |