在查找海量数据时,让光标所在行与列变色会使查找者更便于查找信息。
材料/工具
Microsoft Office 2007
方法
按下Alt+F11进入VB编辑器,双击左侧 的“Thisworkbook”,进入编辑。
粘贴以下代码:
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, 简别总剧举ByVal Target As Range)
If Application.CutCopyMode = xlCopy And n = 1 Then n = 0: End
Cells.Interior.ColorIndex = 0
Target.EntireRow.Interior.ColorIndex = 34
Target.EntireColumn.Interior.ColorIndex = 34
End Sub
点击干线保磁概究模针甲当需保存按钮或Ctrl+s,如果提示警告选择确定。
然后就完成了!