- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-10-30
|
¦^´_ 15# ziv976688
Àx¦s®æ¤ÏÃC¦â¦p¤U¡A½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, Brr
With Sheets("Sheet1")
Arr = .[a1:a10]
R = .Columns("M:V").Find("*", , , , , 2).Row
Brr = .Range("M1:DF" & R)
For i = 4 To UBound(Arr)
If i < UBound(Arr) Then
.Cells(i, 1).Interior.Color = 65280
For j = 1 To UBound(Brr, 2) Step 2
For i2 = 2 To UBound(Brr)
If Brr(i2, j) = Arr(i, 1) Then
.Cells(i2, j + 12).Interior.Color = 65280
End If
Next i2
Next j
Else
.Cells(i, 1).Interior.Color = 16776960
For j = 1 To UBound(Brr, 2) Step 2
For i2 = 2 To UBound(Brr)
If Brr(i2, j) = Arr(i, 1) Then
.Cells(i2, j + 12).Interior.Color = 16776960
End If
Next i2
Next j
End If
Next
End With
End Sub |
|