Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.Color = xlNone
If Target.Count > 1 Then
Exit Sub
Else
Target.EntireColumn.Interior.Color = vbGreen
Target.EntireRow.Interior.Color = vbGreen
End If
End Sub
右键工作表标签》查看代码,复制粘贴以上代码》关闭新弹出的窗口》回到excel中,点击单元格测试效果~