根据描述可以使用VBA的selection change 事件来处理
Excel版本参考:2010
1、ALT+F11,进入VBE编辑器
2、双击Sheet1标签,粘贴如下代码:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
On Error Resume Next
Cells.FormatConditions.Delete
With Target.EntireRow.FormatConditions
.Delete
.Add xlExpression, , "TRUE"
.Item(1).Interior.ColorIndex = 9
End With
With Target.EntireColumn.FormatConditions
.Delete
.Add xlExpression, , "TRUE"
.Item(1).Interior.ColorIndex = 9
End With
End Sub
3、关闭VBE对话框,返回工作表
4、点击单元格,查看效果