excel搜索关键字使其所在单元格所在的整行高亮,需要详细步骤,excel小白,谢谢

如题所述

行与列都高亮的方法:

按ALT+F11,在右边输入如下代码:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    Cells.Interior.ColorIndex = xlNone

    Rows(Selection.Row & ":" & Selection.Row + Selection.Rows.Count - 1).Interior.ColorIndex = 35

    Columns(Selection.Column).Resize(, Selection.Columns.Count).Interior.ColorIndex = 20

End Sub

以下为效果图:

温馨提示:答案为网友推荐,仅供参考
相似回答