How to show Auto Highlight Row Colomn in Excel 365 #FocusCell (video)

Learn simple trick to auto highlight active row and column in Excel 365 using built-in Focus Cell or simple VBA code.

Advertisement

Hello everyone! Today I show you simple trick how to auto highlight row and column in Excel 365. When you work with big data table, very easy to look wrong row or column. This trick help you focus active cell very easy and work faster!

If you use Excel 365, Excel have new feature called Focus Cell built-in. If your Excel don't have this button, you can use simple VBA macro code below!


Option 1 — Built-in Focus Cell (Excel 365 Only)

If you use new Excel 365:

  1. Go to View tab on top menu.
  2. Click Focus Cell button.
  3. Done! Now active row and column auto highlight when you click any cell.

💡 Tip 1: You can click Focus Cell drop-down arrow to change highlight color or line style!


Option 2 — Simple VBA Code (Highlight Full Sheet)

If your Excel doesn't have Focus Cell feature, press Alt + F11 → double click your sheet name on left side → paste this code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    Cells.FormatConditions.Delete

    With Target.EntireRow
        .Interior.Color = RGB(255, 255, 153)
    End With

    With Target.EntireColumn
        .Interior.Color = RGB(255, 255, 153)
    End With

End Sub

Now when you click any cell, Excel auto highlight full row and full column!

💡 Tip 2: You can change RGB(255, 255, 153) to change color (example: RGB(200, 230, 255) for light blue).


Option 3 — Better VBA Code (Highlight Data Range Only)

If you don't want highlight whole sheet, use this code to highlight inside your data table range only (example A1:Z1000):

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    Range("A1:Z1000").Interior.ColorIndex = xlNone

    Intersect(Target.EntireRow, Range("A1:Z1000")).Interior.Color = RGB(255, 255, 153)
    Intersect(Target.EntireColumn, Range("A1:Z1000")).Interior.Color = RGB(255, 255, 153)

End Sub

💡 Tip 3: Remember to change "A1:Z1000" to your real data table range!


⚠️ Important Tip: When using VBA method, you must save file as Excel Macro-Enabled Workbook (*.xlsm). If you save as standard .xlsx, VBA code will delete when you close Excel!

Advertisement
Found this tutorial helpful? Share it with colleagues:
Advertisement