可以試驗一下VBA:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Dim my_Range As Range
For Each my_Range In ActiveSheet.UsedRange
If my_Range.Interior.Color = vbRed Then
my_Range.Clear
my_Range.Interior.Color = 16777215
End If
Next
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If my_Range.Value = Target.Value Then
my_Range.Interior.Color = vbRed
可以試驗一下VBA:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Dim my_Range As Range
For Each my_Range In ActiveSheet.UsedRange
If my_Range.Interior.Color = vbRed Then
my_Range.Clear
my_Range.Interior.Color = 16777215
End If
Next
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Dim my_Range As Range
For Each my_Range In ActiveSheet.UsedRange
my_Range.Interior.Color = 16777215
Next
For Each my_Range In ActiveSheet.UsedRange
If my_Range.Value = Target.Value Then
my_Range.Interior.Color = vbRed
End If
Next
End Sub