excel工作表中数据多时怎么防止看错行
作者:互联网
右击工作表,选择查看代码,弹出VBA界面,直接将下边代码复制粘贴过来,最后关闭VBA界面即可。
代码如下:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
If Target.Count > 1 Then Set Target = Target.Cells(1)
Target.EntireColumn.Interior.ColorIndex = 6
Target.EntireRow.Interior.ColorIndex = 6
End Sub
致敬原创:
标签:VBA,Target,Cells,excel,Sub,ColorIndex,表中,Interior,错行 来源: https://www.cnblogs.com/TheWindReturns/p/15477838.html