VBA - Coloring Rows Instead of Cells
Simply add a loop using the targets row property:
For myloop = 1 To 14
ActiveSheet.Cells(Target.Row, myloop).Interior.ColorIndex = icolor
Next
"J-D" wrote:
Please Help!
I'm using the following in VBA:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("A6:n2000")) Is Nothing Then
Select Case Target
Case 15
icolor = 4
Case -15
icolor = 46
Case 100
icolor = 6
Case -100
icolor = 3
Case Else
'Whatever
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub
It change the color in that cell but I want it to color the row from coulums
A to N? Can somebody show me how to do that?
|