- ©«¤l
- 2824
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2880
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-8-3
|
¥»©«³Ì«á¥Ñ ã´£³¡ªL ©ó 2015-11-29 13:05 ½s¿è
Sub TEST()
Dim i&, R&, C&, xD, xArea As Range, Arr, xR As Range, X&, Y&, Z%
C = [IV2].End(xlToLeft).Column
R = [B65536].End(xlUp).Row
Set xD = CreateObject("Scripting.Dictionary")
For i = 4 To R Step 4: xD(Cells(i, 1) & "") = i - 3: Next i¡@¡@'¨ú±o¡eTester No¡fªº¡e¦C¦ì¡f
For i = 3 To C: xD(Format(Cells(2, i), "yyyy-mm-dd")) = i - 2: Next i¡@'¨ú±o¤é´Áªº¡eÄæ¦ì¡f
Set xArea = [C4].Resize(R - 3, C - 2)¡@'²Îp¼ÆÈ°Ï
xArea.ClearContents: Arr = xArea¡@'²M°£²Îp¡A¥HArr¥N¥X
¡@
For Each xR In Range([summary!D3], [summary!D65536].End(xlUp))
¡@¡@X = xD(xR.Value)¡@'¡eTester No¡fªº¡e¦C¦ì¡f
¡@¡@Y = xD(Format(xR(1, 3), "yyyy-mm-dd"))¡@'¤é´Áªº¡eÄæ¦ì¡f
¡@¡@If X = 0 Or Y = 0 Then GoTo 101
¡@¡@Z = Int(Hour(xR(1, 3)) / 8)¡@'¦¤È±ß®É¬qpºâ
¡@¡@Arr(X + Z, Y) = Arr(X + Z, Y) + 1¡@'²Öp®É¬q¦¸¼Æ
¡@¡@Arr(X + 3, Y) = Arr(X + 3, Y) + 1¡@'²Öp·í¤é¦¸¼Æ
101: Next
xArea = Arr
End Sub |
|