3 Methods to Auto Highlight active ROWS & Columns in Excel | Complete Guide for Beginners

Опубликовано: 21 Май 2026
на канале: Excel Remix
221
19

Hey Everyone!
Welcome back to my YouTube channel, Excel Remix. In this tutorial, you'll learn how to automatically highlight the active row and column in Excel using a simple and working VBA code — perfect for beginners!

This method updates the highlight in real-time as you click around the sheet. No add-ins or extra tools needed!

Steps Covered in This Video:

Open VBA Editor in Excel

Paste and apply the correct VBA code

Save the workbook as Macro-Enabled

Test the result with full row and column highlight

VBA Code Used in Video:

vba
Copy
Edit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.FormatConditions.Delete

With Rows(Target.Row).FormatConditions.Add(Type:=xlExpression, Formula1:="=ROW()=" & Target.Row)
.Interior.Color = RGB(255, 255, 204)
End With

With Columns(Target.Column).FormatConditions.Add(Type:=xlExpression, Formula1:="=COLUMN()=" & Target.Column)
.Interior.Color = RGB(255, 255, 204)
End With
End Sub
Remember to save your file as a .xlsm (Macro-Enabled Workbook)

This is great for working on large datasets and improving visibility in Excel.

Like this video? Subscribe for more Excel tips and VBA tricks every week!

Got questions or stuck somewhere? Drop a comment below — I reply to everyone 😊

#ExcelVBA #ExcelTips #HighlightActiveRowColumn