請測試看看,謝謝
Sub test()
Dim Arr, xU
With Cells.Font
.ColorIndex = 1
.Bold = False
End With
Arr = Range("e6").CurrentRegion
Set xU = [e6]
For i = 2 To UBound(Arr) Step 2
For j = 2 To UBound(Arr, 2)
If Arr(i, j) > Arr(3, 1) Then
Set xU = Union(Cells(i + 5, j + 4).Resize(2, 1), xU)
End If
Next j
Next i
With xU.Font
.ColorIndex = 3
.Bold = True
End With
[e6].Interior.ColorIndex = xlNone
End Sub作者: Andy2483 時間: 2021-10-18 16:29