Highlighting whole row in this macro

E

eastrivergraphics

Can I add something to this so that when the A1:A100 field is changed,
the whole row (A-L) is highlighted ColorIndex 6?

Dim x, cl

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1:A100")) Is Nothing Then Exit Sub
Target.Offset(0, 1) = x
Target.Interior.ColorIndex = 6
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
x = ActiveCell.Value
End Sub
 
D

Dave Peterson

Check your other post.

Can I add something to this so that when the A1:A100 field is changed,
the whole row (A-L) is highlighted ColorIndex 6?

Dim x, cl

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1:A100")) Is Nothing Then Exit Sub
Target.Offset(0, 1) = x
Target.Interior.ColorIndex = 6
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
x = ActiveCell.Value
End Sub
 

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