- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 5# GBKEE
¦^´_ 8# jovi0801
§Ú¥[¤W¤F¤@Äæ "´Á¶¡" (scope) ¦p¦¹¥i¥H²M·¡¦a¬Ý¥X¥¦ÌªºÂkÄÝ¡C
¯Â°Ñ¦Ò¡A§Æ±æ GBKEE ¤j¤j²ö¤¶·N¡C- Sub Ex() ' DatePart("WW", .Rows(xi).Cells(1)) ¶Ç¦^²Ä´X¶g
- Dim AR, xi As Integer, xAr As Integer, Rng As Range, scope As String
-
- With Sheets("¤é»ù®æ")
- AR = Application.Transpose(.Range("A1").CurrentRegion.Rows(1).Value) ' ¨ú±oÄæ¦ì
- xAr = 2
- xi = 2
- ReDim Preserve AR(1 To 6, 1 To xAr) ' ·s¼W¤@ºûªÅ¥Õ°}¦C
-
- Set Rng = .Cells(xi, "A") ' ¤@¶gÀç·~ªº²Ä¤@¤Ñ¤é´Á¦ì¸m
- scope = .Cells(xi, "A")
-
- Do While .Cells(xi, "A") <> ""
- If DatePart("WW", .Cells(xi, "A")) <> DatePart("WW", .Cells(xi + 1, "A")) Then
- Set Rng = Range(Rng, .Cells(xi, "E")) ' ¤@¶gÀç·~ªº²Ä¤@¤Ñ¤é´Á¦ì¸m ¨ì ³Ì«á²Ä¤@¤Ñ¦¬½L»ù¦ì¸m
- AR(1, xAr) = Rng.Cells(1) ' ¤é´Á Rng.Cells(1) ¤é´Á: ¶g¤@ ©Î .Cells(xi, "A") ¤é´Á: ¶g¤(³Ì«á¤@¤Ñ)
- AR(2, xAr) = Rng.Cells(1, 2) ' ¶}½L»ù
- AR(3, xAr) = Application.Max(Rng.Columns(3)) ' ³Ì°ª»ù
- AR(4, xAr) = Application.Min(Rng.Columns(4)) ' ³Ì§C»ù
- AR(5, xAr) = .Cells(xi, "E") ' ¦¬½L»ù
- AR(6, xAr) = scope & "-" & .Cells(xi, "A")
-
- If .Cells(xi + 1, "A") <> "" Then
- Set Rng = .Cells(xi + 1, "A")
- xAr = xAr + 1
- scope = .Cells(xi + 1, "A")
- ReDim Preserve AR(1 To 6, 1 To xAr)
- End If
- End If
- xi = xi + 1
- Loop
- End With
-
- With Sheets("©P»ù®æ")
- .UsedRange.Clear
- .[A1].Resize(xAr, 6) = Application.Transpose(AR)
- End With
- End Sub
½Æ»s¥N½X
¤é»ù®æ«ç»òÂàÅܦ¨¶g»ù®æ.rar (9.85 KB)
|
|