- ©«¤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
|
¦^´_ 1# jeff5424
½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, xU, i%, j%
Arr = Range([a1], [ay65536].End(3))
'Cells.Interior.ColorIndex = 0
Set xU = [a1]
For j = 24 To 27: For i = 2 To UBound(Arr)
If IsNumeric(Arr(i, j)) Then
If Val(Arr(i, j)) < 0 Then
If j = 24 Then Set xU = Union(Cells(i, j), Cells(i, j - 19), Cells(i, j - 5), Cells(i, j + 6), Cells(i, j + 15), xU)
If j = 25 Then Set xU = Union(Cells(i, j), Cells(i, j - 16), Cells(i, j - 5), Cells(i, j + 6), Cells(i, j + 18), xU)
If j = 26 Then Set xU = Union(Cells(i, j), Cells(i, j - 13), Cells(i, j - 5), Cells(i, j + 6), Cells(i, j + 21), xU)
If j = 27 Then Set xU = Union(Cells(i, j), Cells(i, j - 10), Cells(i, j - 5), Cells(i, j + 6), Cells(i, j + 24), xU)
End If
End If
Next i: Next j
xU.Interior.ColorIndex = 3
[a1].Interior.ColorIndex = xlNone
End Sub |
|