选取后,整列变红,自己根据你的条件修改一下就可以了
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
On Error Resume Next
Application.ScreenUpdating = False
Cells.FormatConditions.Delete
With Target.EntireColumn.FormatConditions
.Delete
.Add xlExpression, , "TRUE"
.Item(1).Interior.ColorIndex = 3
End With
Application.ScreenUpdating = True
End Sub
温馨提示:答案为网友推荐,仅供参考