EXCEL防止看错行列VBA代码

 时间:2024-11-01 10:34:32

1、打开需要使用防止看错行的工作薄,选中工作表标签,单击鼠标右键,选择“查看代码”进入到VBA工程窗口。

EXCEL防止看错行列VBA代码EXCEL防止看错行列VBA代码

2、将代码复制到需要使用的工作表的代码窗口。

EXCEL防止看错行列VBA代码

3、代码:Private Sub Worksheet_SelectionChange(ByVal Tar爿讥旌护get As Excel.Range) On Error Resume Next Cells.FormatConditions.Delete With Target.EntireRow.FormatConditions .Delete .Add xlExpression, , "TRUE" .Item(1).Interior.ColorIndex = 24 End With With Target.EntireColumn.FormatConditions .Delete .Add xlExpression, , "TRUE" .Item(1).Interior.ColorIndex = 24 End With Selection.FormatConditions.DeleteEnd Sub效果如图:

EXCEL防止看错行列VBA代码
  • 在EXCEL如何避免看错行
  • Excel名称管理器使用技巧的详细讲解
  • Excel2019如何开启用智能鼠标缩放
  • excel2019怎么样快速高亮显示选中的行和列
  • Excel 2016如何在名称中使用合并区域引用
  • 热门搜索
    淘宝怎么评价 怎么看电脑内存 竞选稿怎么写 留言条怎么写 数学符号怎么打出来 凉面怎么做 一件代发怎么操作 银行卡怎么办理 什邡怎么读 呼吸不顺畅胸闷是怎么回事