Row Highlight – Excel

This post will explain steps to highlight selected row in excel. Row highlight will change dynamically based upon selection change.

This can be helpful during a meeting or discussion to keep audience focused on excel row in discussion. Find below steps to setup this functionality.

Steps: Row Highlight Configurations

  • Open excel file
  • Select cell range containing data
  • Go to conditional formatting and select new rule. This will open new formatting rule window.
Excel Row Highlight
Conditional Formatting

Following link to learn more about excel conditional formatting

  • Select “use a fornula to determine which cells to format”. As shown below.
  • Paste following formula in formula field
=ROW()=CELL("ROW")
  • Select format button right next to preview area
  • Go to fill and select background color for the selected row
Formatting Rule Window
Formatting Rule Window
Cell Fill
Cell Fill
  • Apply and close format cells and new formatting rule windows
  • Final conditional formatting setting will look like below
Final Format Settings
Final Format Settings
  • Next go to developer tab in excel as shown below and select “View Code”

Go to link to see steps to enable excel developer tab

Developer Tab
Excel Developer Tab
  • Select worksheet from drop down as shown below
  • This will open code block behind excel worksheet
Excel Code Editor
Excel Code Editor
  • Add following code in code editor (as show in screenshot below)
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target.Calculate
End Sub
Worksheet updated code block
Worksheet updated code block
  • Close code editor and go back to excel sheet
  • Configurations are completed. Now we can test if “Highlight selected row” configurations are working as expected.
  • Select any row in the cell range that was selected for conditional formatting
    • Row highlighting should dynamically change as row selection changes
Row Highlight
Highlight Selected Row

Other posts from blog

2 thoughts on “Row Highlight – Excel

Leave a Reply