2024年4月27日发(作者:)

Excel行列选中变色

1. 操作

a) ALT+F11,进入VBE编辑器

b) 双击Sheet1标签,粘贴如下代码:

2. 代码

Private Sub Worksheet_SelectionChange(ByVal Target As )

On Error Resume Next

With Conditions

.Delete

.Add xlExpression, , "TRUE"

.Item(1).ndex = 35

End With

With Conditions

.Delete

.Add xlExpression, , "TRUE"

.Item(1).ndex = 35

End With

End Sub

3. 颜色表

4. 效果预览