- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 244
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-10
|
¦^´_ 31# tonycho33
¸Õ¸Õ¬Ý- Private Sub Worksheet_Activate()
- Set d = CreateObject("Scripting.Dictionary")
- Set d1 = CreateObject("Scripting.Dictionary")
- With Sheet6
- For Each A In .Range("I2", .[I65536].End(xlUp)).SpecialCells(xlCellTypeConstants)
- If A <> "" And A.Offset(, 1) = "" Then
- mystr = Join(Application.Transpose(Application.Transpose(A.Offset(, -8).Resize(, 5).Value)), "")
- d(mystr) = d(mystr) + 1
- ElseIf A.Offset(, 1) - A Then
- mystr = Join(Application.Transpose(Application.Transpose(A.Offset(, -8).Resize(, 5).Value)), "")
- d1(mystr) = d1(mystr) + 1
- End If
- Next
- End With
- With Me
- r = 2
- Do Until .Cells(r, 1) = ""
- Set A = .Cells(r, 1)
- mystr = A & A.Offset(, 1)
- For Each c In .Range(A.Offset(, 6), A.Offset(, 6).End(xlToRight))
- temp = mystr & Join(Application.Transpose(c.Resize(3, 1)), "")
- If d.exists(temp) = True Then
- c.Resize(3, 1).Interior.ColorIndex = 4
- ElseIf d1.exists(temp) = True Then
- c.Resize(3, 1).Interior.ColorIndex = 6
- Else
- c.Resize(3, 1).Interior.ColorIndex = 0
- End If
- Next
- r = r + 3
- Loop
- End With
- End Sub
½Æ»s¥N½X |
|