以ä¸ä»£ç æ¯å°éæ©åå
æ ¼åå
¶å®ä¸ä¹ç¸åçåå
æ ¼é¢è²è®¾ç½®ä¸ºçº¢è²èæ¯
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
If Target <> "" Then
Cells.Interior.ColorIndex = 0
Dim rg As Range
For Each rg In UsedRange
If rg = Target.Value Then
rg.Interior.ColorIndex = 3
End If
Next
Else: Exit Sub: End If
Else: Exit Sub: End If
End Sub
å¦æåªæ¯æ»¡è¶³ä½ é¢æè¦æ±ï¼å¯ä»¥ä½¿ç¨ä¸é¢è¿æ®µ
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
Cells.Interior.ColorIndex = 0
If Target = [a2] Then
[d3].Interior.ColorIndex = 3
[d6].Interior.ColorIndex = 3
[d8].Interior.ColorIndex = 3
Else: Exit Sub: End If
Else: Exit Sub: End If
End Sub
温馨提示:内容为网友见解,仅供参考