- ©«¤l
- 2836
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2892
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-30
|
³W«h¬Ý°_¨Ó²V¶Ã, ¤j¬ù¼g¤@¤U, ²´·ú¤w¨ü¤£¤F, YÁÙ¦³»~®t, µ¥¨ä¥L¤j¤j¨Ó§a!- Sub ¶ñ¦â()
- Dim xDic, xR As Range, TR, CC%
- If Not IsDate([C1]) Then MsgBox "¤é´Á®É¶¡¥¼¿é¤J! ": Exit Sub
- Set xDic = CreateObject("Scripting.Dictionary")
- For Each xR In Range([A1], [A65536].End(xlUp))
- If xR.Row > 1 And xR <> "" Then xDic(xR.Value) = Array(99, 0, 0) '¨Ò¥~®Æ¸¹,¥H99¬°ÃѧO½X
- Next
- For Each xR In Range([C3], [C65536].End(xlUp))
- If xR = "" Or Not IsDate(xR(1, 4)) Then GoTo 101 'µL®Æ¸¹©Î«D¤é´Á,²¤¹L
- TR = xDic(xR.Value) '¨ú¥X¦r¨åÀÉITEM
- If Not IsArray(TR) Then TR = Array(0, 0, 0) 'º¦¸¤J¦r¨åªÌ, ©ñ¤J¹w³]°}¦C
- If TR(0) = 99 Then GoTo 101 'ÃѧO½X¬°99, ªí¥Ü¬°¨Ò¥~, ©Î¤£²Å³W«h, ²¤¹L
- If xR(1, 4) > [C1] And TR(1) = 0 Then TR(0) = TR(0) + 10: TR(1) = 1 '¤j¤_C1, ¥[10¬°ÃѧO½X
- If xR(1, 4) < [C1] Then '¤p¤_C1®É
- If TR(2) = 0 Then TR(0) = TR(0) + 1: TR(2) = Int(xR(1, 4)) '°}¦C²Ä3ÓY¬°0, ªí¥Ü¬°²Ä1Ó¤é´Á,¶ñ¤J¤é´Á, ÃѧO½X¥[1
- If Int(xR(1, 4)) <> TR(2) Then TR(0) = 99 'Y¤é´Á¤£¬Û¦P, ªí¥Ü¤p¤_C1¤é´Á¶W¹L2Ó,¥H99¬°ÃѧO½X
- End If
- xDic(xR.Value) = TR
- 101: Next
- For Each xR In Range([C3], [C65536].End(xlUp))
- If xR = "" Or Not IsDate(xR(1, 4)) Then GoTo 102
- TR = xDic(xR.Value): CC = 0
- If TR(0) = 10 Then CC = 3 '¥u¦³¤j¤_C1¤é´Á, ÃѧO½X=10
- If TR(0) = 11 And xR(1, 4) < [C1] Then CC = 7 '¦³¤j¤_C1¤é´Á, ¥B¤p¤_C1¤é´Á¥u¦³¤@Ó, ÃѧO½X=10+1
- If CC > 0 Then xR.Resize(1, 4).Interior.ColorIndex = CC
- 102: Next
- End Sub
½Æ»s¥N½X
Xl0000012.rar (15.7 KB)
|
|