Highlighting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using the following code to highlight the entire row of the selected cell:

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

Rows.Interior.ColorIndex = xlNone
ActiveCell.EntireRow.Interior.ColorIndex = 6
End Sub

What do I need to add, to make it also highlight the corresponding cell on
row 2 of the active cell??

thanks!
 
if you mean the cell below the active cell add
Cells(ActiveCell.Row + 1, ActiveCell.Column).Interior.ColorIndex = 6
just above your end sub line

if you mean the cell in row two above your active cell enter
Cells(2, ActiveCell.Column).Interior.ColorIndex = 6
instead
 
Back
Top