Highlight Active Row And Column in excel Most of us working on excel and if we have a lot of data in excel then we need to guess in which cell we are
Highlight Active Row And Column in excel
Most of us working on excel and if we have a lot of data in excel then we need to guess in which cell we are working...here is one simple method.
Just copy the below code and open the excel sheet in which you want to highlight the text then click Alt+F11 or click on view code on the developer tab.
then paste in the Code view section of sheet1 or in the sheet in which you are working then save the file in XLSM or Xls format.
[Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
Application.ScreenUpdating = False
' Clear the color of all the cells
Cells.Interior.ColorIndex = 0
With Target
' Highlight the entire row and column that contain the active cell
.EntireRow.Interior.ColorIndex = 6
.EntireColumn.Interior.ColorIndex = 6
End With
Application.ScreenUpdating = True
End Sub
]
COMMENTS