Automatically Highlight Rows and Columns in Excel

Опубликовано: 26 Июнь 2026
на канале: Watch Learn Grow Repeat
14,224
107

In this video we will look at how to get Microsoft Excel to automatically highlight the current row and column for us which will help in the data entry.

The VBA code used in this video is pasted below.

If you liked this video then please give it a thumbs up and it you would like to see more videos like this then please subscribe.

=================================
VBA CODE
==================================
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

With ThisWorkbook.Names("RowHighlighter")
.Name = "RowHighlighter"
.RefersToR1C1 = "=" & ActiveCell.Row
End With

With ThisWorkbook.Names("ColumnHighlighter")
.Name = "ColumnHighlighter"
.RefersToR1C1 = "=" & ActiveCell.Column
End With

End Sub