Hi,
I'm trying to change range row color based on cell value.
my code works but instead of changing range row color it changes entire row.
I want To change color just in A:H.
Thank you
here is my code:
Sub Roww()
Dim Tim As Date
Dim oCell As Range
Dim drow As Integer
Tim = TimeValue("01:09:00")
Sheets("Sheet3").Select
For Each oCell In Range("d3:d100")
If oCell.Value > Tim Then
drow = oCell.row()
Rows(drow & ":" & drow).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Moderators note: code tags added for you - this time
Bookmarks