当数据量大的时候,我们往往会看错行或者看错列,使用本代码,复制在需要的工作表的代码窗口即可使用。
01 打开需要使用防止看错行的工作薄,选中工作表标签,单击鼠标右键,选择“查看代码”进入到VBA工程窗口。
02 将代码复制到需要使用的工作表的代码窗口。
03 代码:Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)On Error Resume NextCells.FormatConditions.DeleteWith Target.EntireRow.FormatConditions.Delete.Add xlexpression, , "TRUE".Item(1).Interior.ColorIndex = 24End WithWith Target.EntireColumn.FormatConditions.Delete.Add xlexpression, , "TRUE".Item(1).Interior.ColorIndex = 24End WithSelection.FormatConditions.DeleteEnd Sub效果如图:
代码粘贴位置要找对。

