Highlighting

E

Ed

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!
 
B

bj

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top