[SIZE="2"]I have this code that colors rows based on input. It works fine when in the A column and can stretch to the right. Now, I have used this same vba to highlight a middle column and would like to have the cells to the left and right get colored.
I gave it my best shot, but kept missing. Any thoughts?
thanks
![]()
Private Sub worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("C1:C500")) Is Nothing Then _ Invoices Intersect(Target, Range("C1:C500")) End Sub Sub Invoices(ByVal rng As Range) Dim r As Range, myColor As Integer For Each r In rng myColor = xlNone Select Case r.Value Case "DEEPLY LAPSED" To "DEEPLY LAPSED ZZ" myColor = 35 End Select r.Resize(, 5).Interior.ColorIndex = myColor Next End Sub
Bookmarks