Excel - Highlight active row
Wondering if there is some preference I can set in excel so that when I am in a specific cell the entire row is slightly highlighted (not overl开发者_运维技巧y so but enough to easily tell it out)
Similar to the fashion that Notepad++ works in tab delimeted files, and highlights the entire row.
Thanks in advance
I do not know of any built-in preferences in Excel to do this but it can be done using VBA. Place the following in "ThisWorkbook" of the VBAProject:
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Tgt As Range)
If Tgt.Cells.Count = 1 Then
ActiveSheet.Rows(Tgt.Row).Select
Tgt.Activate
End If
End Sub
The code only highlights the active row if a single cell is selected so that it does not interfere when multiple cells are selected.
精彩评论